Fixed regression with getting/setting user variables

See http://forum.zdoom.org/viewtopic.php?t=50727
This commit is contained in:
alexey.lysiuk 2016-02-07 15:32:55 +02:00
parent f625be61a2
commit 7fa5cb788b

View file

@ -4561,7 +4561,7 @@ bool GetVarAddrType(AActor *self, FName varname, int index, void *&addr, PType *
{ {
PField *var = dyn_cast<PField>(self->GetClass()->Symbols.FindSymbol(varname, true)); PField *var = dyn_cast<PField>(self->GetClass()->Symbols.FindSymbol(varname, true));
PArray *arraytype; PArray *arraytype;
BYTE *baddr = reinterpret_cast<BYTE *>(self); BYTE *baddr = reinterpret_cast<BYTE *>(self) + var->Offset;
if (var == NULL || (var->Flags & VARF_Native)) if (var == NULL || (var->Flags & VARF_Native))
{ {