diff options
author | Max Horn | 2004-10-07 21:23:29 +0000 |
---|---|---|
committer | Max Horn | 2004-10-07 21:23:29 +0000 |
commit | f488f4c15fbdc1342f1729b5701a01de6a483fea (patch) | |
tree | c18bfbaea91b95e266747a87c07ff59f9b1da0f0 /scumm/saveload.cpp | |
parent | 186201c68f9910fa3001e668024339cb8e2a7244 (diff) | |
download | scummvm-rg350-f488f4c15fbdc1342f1729b5701a01de6a483fea.tar.gz scummvm-rg350-f488f4c15fbdc1342f1729b5701a01de6a483fea.tar.bz2 scummvm-rg350-f488f4c15fbdc1342f1729b5701a01de6a483fea.zip |
Another attempt at a fix for bug #1032964 (INDY3-VGA: actors walking in wrong places), by making sure all actor walkdata is saved
svn-id: r15455
Diffstat (limited to 'scumm/saveload.cpp')
-rw-r--r-- | scumm/saveload.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 944bf59996..38a339da8d 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -707,6 +707,13 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) { _system->warpMouse(_mouse.x, _mouse.y); } + if (s->isLoading()) { + // Not all actor data is saved; so when loading, we first reset + // all actors, to ensure completely reproducible behaviour (else, + // some not saved value in the actor class can cause odd things) + for (i = 0; i < _numActors; i++) + _actors[i].initActor(-1); + } s->saveLoadArrayOf(_actors, _numActors, sizeof(_actors[0]), actorEntries); s->saveLoadEntries(_sound, soundEntries); |