From 834da8b83b4cb66cc7e7e0b877cd49aef60f2bd1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 14 Mar 2021 12:57:23 +0100 Subject: [PATCH] - 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 --- source/games/exhumed/src/save.cpp | 1 + source/games/exhumed/src/status.cpp | 36 ----------------------------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/source/games/exhumed/src/save.cpp b/source/games/exhumed/src/save.cpp index ca556c3da..61976e148 100644 --- a/source/games/exhumed/src/save.cpp +++ b/source/games/exhumed/src/save.cpp @@ -133,6 +133,7 @@ void GameInterface::SerializeGameState(FSerializer& arc) } Mus_ResumeSaved(); + RefreshStatus(); } } diff --git a/source/games/exhumed/src/status.cpp b/source/games/exhumed/src/status.cpp index 68dec7226..1864e6191 100644 --- a/source/games/exhumed/src/status.cpp +++ b/source/games/exhumed/src/status.cpp @@ -1010,40 +1010,4 @@ void DrawStatusBar() 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