mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #16687 from ZehMatt/fix-16617
Fix #16617: Park format storing/loading temporary paused state
This commit is contained in:
commit
045a78930e
|
@ -422,7 +422,18 @@ namespace OpenRCT2
|
|||
void ReadWriteGeneralChunk(OrcaStream& os)
|
||||
{
|
||||
auto found = os.ReadWriteChunk(ParkFileChunkType::GENERAL, [this](OrcaStream::ChunkStream& cs) {
|
||||
cs.ReadWrite(gGamePaused);
|
||||
// Only GAME_PAUSED_NORMAL from gGamePaused is relevant.
|
||||
if (cs.GetMode() == OrcaStream::Mode::READING)
|
||||
{
|
||||
const uint8_t isPaused = cs.Read<uint8_t>();
|
||||
gGamePaused &= ~GAME_PAUSED_NORMAL;
|
||||
gGamePaused |= (isPaused & GAME_PAUSED_NORMAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
const uint8_t isPaused = (gGamePaused & GAME_PAUSED_NORMAL);
|
||||
cs.Write(isPaused);
|
||||
}
|
||||
cs.ReadWrite(gCurrentTicks);
|
||||
cs.ReadWrite(gDateMonthTicks);
|
||||
cs.ReadWrite(gDateMonthsElapsed);
|
||||
|
|
Loading…
Reference in New Issue