diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 7115b611c1..0ddbdf0c20 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4561,7 +4561,7 @@ bool GetVarAddrType(AActor *self, FName varname, int index, void *&addr, PType * { PField *var = dyn_cast(self->GetClass()->Symbols.FindSymbol(varname, true)); PArray *arraytype; - BYTE *baddr = reinterpret_cast(self); + BYTE *baddr = reinterpret_cast(self) + var->Offset; if (var == NULL || (var->Flags & VARF_Native)) {