Added CVar.GetCVar() function to do player-dependent console variables lookup

This commit is contained in:
alexey.lysiuk 2017-04-06 10:51:36 +03:00
commit ca4888eb3d
2 changed files with 9 additions and 0 deletions

View file

@ -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;