mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
Added CVar.GetCVar() function to do player-dependent console variables lookup
This commit is contained in:
parent
26e4b74261
commit
ca4888eb3d
2 changed files with 9 additions and 0 deletions
|
@ -1544,6 +1544,14 @@ DEFINE_ACTION_FUNCTION(_CVar, FindCVar)
|
|||
ACTION_RETURN_POINTER(FindCVar(name, nullptr));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_CVar, GetCVar)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_NAME(name);
|
||||
PARAM_POINTER_DEF(plyr, player_t);
|
||||
ACTION_RETURN_POINTER(GetCVar(plyr ? plyr->mo : nullptr, name));
|
||||
}
|
||||
|
||||
FBaseCVar *FindCVarSub (const char *var_name, int namelen)
|
||||
{
|
||||
FBaseCVar *var;
|
||||
|
|
|
@ -287,6 +287,7 @@ struct CVar native
|
|||
};
|
||||
|
||||
native static CVar FindCVar(Name name);
|
||||
native static CVar GetCVar(Name name, PlayerInfo player = null);
|
||||
native int GetInt();
|
||||
native double GetFloat();
|
||||
native String GetString();
|
||||
|
|
Loading…
Reference in a new issue