From f488f4c15fbdc1342f1729b5701a01de6a483fea Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 7 Oct 2004 21:23:29 +0000 Subject: 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 --- scumm/saveload.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scumm/saveload.cpp') 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); -- cgit v1.2.3