- added a GetCVarString ZScript/DECORATE function.
- fixed: loading a savegame triggered PlayerEntered events.
This commit is contained in:
parent
99d1581c27
commit
6870efe134
3 changed files with 35 additions and 1 deletions
|
|
@ -654,6 +654,36 @@ DEFINE_ACTION_FUNCTION(AActor, GetCVar)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// GetCVar
|
||||
//
|
||||
// NON-ACTION function that works like ACS's GetCVar.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, GetCVarString)
|
||||
{
|
||||
if (numret > 0)
|
||||
{
|
||||
assert(ret != nullptr);
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_STRING(cvarname);
|
||||
|
||||
FBaseCVar *cvar = GetCVar(self, cvarname);
|
||||
if (cvar == nullptr)
|
||||
{
|
||||
ret->SetString("");
|
||||
}
|
||||
else
|
||||
{
|
||||
ret->SetString(cvar->GetGenericRep(CVAR_String).String);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// GetPlayerInput
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue