mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
NANCY: Clear generic flags when loading save
This fixes some weird behavior in scenes that use the kSound dependency type. When the player clicks a trigger that plays a sound, but saves the game while the sound is being played, that trigger may end up disabled on load, breaking the game.
This commit is contained in:
parent
2bd6092738
commit
a97ee89118
@ -662,6 +662,11 @@ void Scene::synchronize(Common::Serializer &ser) {
|
||||
|
||||
ser.syncArray(_flags.eventFlags.data(), g_nancy->getStaticData().numEventFlags, Common::Serializer::Byte);
|
||||
|
||||
// Clear generic flags
|
||||
for (uint16 id : g_nancy->getStaticData().genericEventFlags) {
|
||||
_flags.eventFlags[id] = g_nancy->_false;
|
||||
}
|
||||
|
||||
// Skip empty sceneCount array
|
||||
ser.skip(2001 * 2, 0, 2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user