- Exhumed: refresh the status bar after loading a saved game.

It is actually not necessary to save the state - but the RefreshStatus function must be called to update all current values.
Fixes #282
This commit is contained in:
Christoph Oelckers 2021-03-14 12:57:23 +01:00
parent 90cb82d244
commit 834da8b83b
2 changed files with 1 additions and 36 deletions

View file

@ -133,6 +133,7 @@ void GameInterface::SerializeGameState(FSerializer& arc)
} }
Mus_ResumeSaved(); Mus_ResumeSaved();
RefreshStatus();
} }
} }

View file

@ -1010,40 +1010,4 @@ void DrawStatusBar()
StatusBar->UpdateStatusBar(); StatusBar->UpdateStatusBar();
} }
// This should not be necessary but the game only lazily updates the statusbar data.
void SerializeStatus(FSerializer& arc)
{
if (arc.BeginObject("status"))
{
arc("masky", nMaskY)
("magicperline", magicperline)
("airperline", airperline)
("healthperline", healthperline)
("airframes", nAirFrames)
("counter", nCounter)
("counterdest", nCounterDest)
("itemframes", nItemFrames)
("itemseq", nItemSeq)
("magicframes", nMagicFrames)
("healthlevel", nHealthLevel)
("itemframe", nItemFrame)
("meterrange", nMeterRange)
("magiclevel", nMagicLevel)
("healthframe", nHealthFrame)
("magicframe", nMagicFrame)
("airframe", airframe)
("firstanim", nFirstAnim)
("lastanim", nLastAnim)
("itemaltseq", nItemAltSeq)
("airpages", airpages)
("ammodelay", ammodelay)
("counterbullet", nCounterBullet)
.Array("digit", nDigit, 3)
.Array("itemseqoffset", nItemSeqOffset, countof(nItemSeqOffset))
("statusanim", StatusAnim)
.EndObject();
}
}
END_PS_NS END_PS_NS