aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-16 13:42:58 -0400
committerPaul Gilbert2015-08-16 13:42:58 -0400
commit8950549b440d6649bf1021015f72c2af919703fe (patch)
tree5a9c255a815d77f5be062e4b2266dbf7cd9cb2d3 /engines/sherlock/tattoo
parent621a37bbe30756a7983c1e5463389539898d41a5 (diff)
downloadscummvm-rg350-8950549b440d6649bf1021015f72c2af919703fe.tar.gz
scummvm-rg350-8950549b440d6649bf1021015f72c2af919703fe.tar.bz2
scummvm-rg350-8950549b440d6649bf1021015f72c2af919703fe.zip
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
Diffstat (limited to 'engines/sherlock/tattoo')
-rw-r--r--engines/sherlock/tattoo/tattoo_people.cpp15
1 files changed, 5 insertions, 10 deletions
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)