- moved OwnedStates and NumOwnedStates out of PClassActor.

This commit is contained in:
Christoph Oelckers 2017-04-11 22:44:35 +02:00
commit 4afe2d4218
11 changed files with 37 additions and 41 deletions

View file

@ -1877,7 +1877,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FState *&state, FState
{
arc.w->StartArray();
arc.w->String(info->TypeName.GetChars());
arc.w->Uint((uint32_t)(state - info->OwnedStates));
arc.w->Uint((uint32_t)(state - info->ActorInfo()->OwnedStates));
arc.w->EndArray();
}
else
@ -1908,9 +1908,9 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FState *&state, FState
if (cls.IsString() && ndx.IsUint())
{
PClassActor *clas = PClass::FindActor(UnicodeToString(cls.GetString()));
if (clas && ndx.GetUint() < (unsigned)clas->NumOwnedStates)
if (clas && ndx.GetUint() < (unsigned)clas->ActorInfo()->NumOwnedStates)
{
state = clas->OwnedStates + ndx.GetUint();
state = clas->ActorInfo()->OwnedStates + ndx.GetUint();
}
else
{