From 8950549b440d6649bf1021015f72c2af919703fe Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 16 Aug 2015 13:42:58 -0400 Subject: SHERLOCK: Further fixes to character movement across saves Restoring movement across save didn't work, so properly handle stopping any moving characters when loading a savegame --- engines/sherlock/tattoo/tattoo_people.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'engines/sherlock/tattoo') diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp index 19010a6578..c5b03b285d 100644 --- a/engines/sherlock/tattoo/tattoo_people.cpp +++ b/engines/sherlock/tattoo/tattoo_people.cpp @@ -968,20 +968,18 @@ void TattooPerson::checkWalkGraphics() { } void TattooPerson::synchronize(Serializer &s) { - s.syncAsSint32LE(_position.x); - s.syncAsSint32LE(_position.y); - s.syncAsSint32LE(_delta.x); - s.syncAsSint32LE(_delta.y); - s.syncAsSint16LE(_sequenceNumber); - s.syncAsSint16LE(_walkCount); - if (s.isSaving()) { SpriteType type = (_type == INVALID && _walkLoaded) ? HIDDEN_CHARACTER : _type; s.syncAsSint16LE(type); } else { + if (_walkCount) + gotoStand(); + s.syncAsSint16LE(_type); } + s.syncAsSint32LE(_position.x); + s.syncAsSint32LE(_position.y); s.syncString(_walkVGSName); s.syncString(_description); s.syncString(_examine); @@ -992,9 +990,6 @@ void TattooPerson::synchronize(Serializer &s) { s.syncAsSint32LE(_npcPause); s.syncAsByte(_lookHolmes); s.syncAsByte(_updateNPCPath); - - // Walk to list - _walkTo.synchronize(s); // Verbs for (int idx = 0; idx < 2; ++idx) -- cgit v1.2.3