Allow setting string user variables in ACS
This commit is contained in:
parent
4494b18e8a
commit
bd7791ad9c
3 changed files with 13 additions and 9 deletions
|
|
@ -1658,7 +1658,7 @@ static void SetMapThingUserData(AActor *actor, unsigned udi)
|
|||
else
|
||||
{ // Set the value of the specified user variable.
|
||||
void *addr = reinterpret_cast<uint8_t *>(actor) + var->Offset;
|
||||
if (var->Type->isString())
|
||||
if (var->Type == TypeString)
|
||||
{
|
||||
var->Type->InitializeValue(addr, &MapThingsUserData[udi].StringVal);
|
||||
}
|
||||
|
|
@ -1666,7 +1666,7 @@ static void SetMapThingUserData(AActor *actor, unsigned udi)
|
|||
{
|
||||
var->Type->SetValue(addr, MapThingsUserData[udi].FloatVal);
|
||||
}
|
||||
else if (var->Type->isIntCompatible())
|
||||
else if (var->Type->isInt() || var->Type == TypeBool)
|
||||
{
|
||||
var->Type->SetValue(addr, MapThingsUserData[udi].IntVal);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue