From e1ae2a091eb34a1db3673f1489c2a194af9b7afe Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Oct 2023 17:09:14 +0200 Subject: [PATCH] activated the state pointer serializer. --- source/core/serializer_raze.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/core/serializer_raze.cpp b/source/core/serializer_raze.cpp index ddf82332f..601eabae5 100644 --- a/source/core/serializer_raze.cpp +++ b/source/core/serializer_raze.cpp @@ -171,7 +171,6 @@ template<> FSerializer &Serialize(FSerializer &arc, const char *key, PClassActor FSerializer &Serialize(FSerializer &arc, const char *key, FState *&state, FState **def, bool *retcode) { -#if 0 if (retcode) *retcode = false; if (arc.isWriting()) { @@ -222,7 +221,7 @@ 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->GetStateCount()) + if (clas && ndx.GetUint() < (unsigned)clas->ActorInfo()->NumOwnedStates) { state = clas->GetStates() + ndx.GetUint(); } @@ -248,7 +247,6 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FState *&state, FState } } } -#endif return arc; }