Skip to content

Commit

Permalink
- SW: fixed recursive saving of panel sprites
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Sep 12, 2021
1 parent bad57f6 commit 0e82d75
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/games/sw/src/save.cpp
Expand Up @@ -288,19 +288,19 @@ void preSerializePanelSprites(FSerializer& arc)

void postSerializePanelSprites(FSerializer& arc)
{
if (arc.isWriting())
{
unsigned siz = pspAsArray.Size();
arc("panelcount", siz);
}
if (arc.BeginArray("panelsprites"))
{
for (auto psp : pspAsArray)
for(unsigned i = 0; i < pspAsArray.Size(); i++)
{
arc(nullptr, *psp);
arc(nullptr, *pspAsArray[i]);
}
arc.EndArray();
}
if (arc.isWriting())
{
unsigned siz = pspAsArray.Size();
arc("panelcount", siz);
}
}

//---------------------------------------------------------------------------
Expand Down

0 comments on commit 0e82d75

Please sign in to comment.