- Exhumed: fixed serialization.

The exhumedActors array was not written out, resulting in all kinds of strange effects.
This commit is contained in:
Christoph Oelckers 2021-11-07 21:45:51 +01:00
parent 6b6c3f26a5
commit 60faceaf59
4 changed files with 21 additions and 16 deletions

View file

@ -72,12 +72,12 @@ const char *GetVersionString();
#define MINSAVEVER_DN3D 10
#define MINSAVEVER_BLD 11
#define MINSAVEVER_SW 12
#define MINSAVEVER_PS 14
#define MINSAVEVER_PS 15
#define SAVEVER_DN3D 11
#define SAVEVER_BLD 11
#define SAVEVER_SW 12
#define SAVEVER_PS 14
#define SAVEVER_PS 15
#define OLD_SAVEGAME 1 // this is to keep writing out the old format in Blood, even when data has been refactored.
#define NETGAMEVERSION 1

View file

@ -642,6 +642,7 @@ void SerializeState(FSerializer& arc)
("slipmode", bSlipMode)
("PlayClock", PlayClock)
("spiritsprite", pSpiritSprite)
.SparseArray("actors", exhumedActors, kMaxSprites, activeSprites)
.EndObject();
}
}

View file

@ -73,6 +73,7 @@ void GameInterface::SerializeGameState(FSerializer& arc)
SerializeQueen(arc);
SerializeRat(arc);
arc.EndObject();
}
if (arc.isReading())
{

View file

@ -485,20 +485,23 @@ void Clip()
void SerializeView(FSerializer& arc)
{
arc("camerax", nCamerax)
("cameray", nCameray)
("cameraz", nCameraz)
("touchfloor", bTouchFloor)
("chunktotal", nChunkTotal)
("cameraa", nCameraa)
("camerapan", nCamerapan)
("camera", bCamera)
("viewz", viewz)
("enemy", pEnemy)
("enemypal", nEnemyPal)
.Array("vertpan", dVertPan, countof(dVertPan))
.Array("quake", nQuake, countof(nQuake))
.EndObject();
if (arc.BeginObject("view"))
{
arc("camerax", nCamerax)
("cameray", nCameray)
("cameraz", nCameraz)
("touchfloor", bTouchFloor)
("chunktotal", nChunkTotal)
("cameraa", nCameraa)
("camerapan", nCamerapan)
("camera", bCamera)
("viewz", viewz)
("enemy", pEnemy)
("enemypal", nEnemyPal)
.Array("vertpan", dVertPan, countof(dVertPan))
.Array("quake", nQuake, countof(nQuake))
.EndObject();
}
}
END_PS_NS