- properly write out the genPatrolStates in savegames.

This commit is contained in:
Christoph Oelckers 2021-09-10 23:52:05 +02:00
parent f370c0f22f
commit 64b67291bc

View file

@ -403,10 +403,15 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, AISTATE*& w, AISTA
if (w == cstate)
{
arc(keyname, i);
break;
return arc;
}
i++;
}
if (w >= genPatrolStates && w < genPatrolStates + kPatrolStateSize)
{
i = int(w - genPatrolStates) + 1000;
arc(keyname, i);
}
}
else
{
@ -415,6 +420,10 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, AISTATE*& w, AISTA
{
w = allAIStates[i];
}
else if (i >= 1000 && i < 1000 + kPatrolStateSize)
{
w = genPatrolStates + i;
}
else
{
w = nullptr;