From 142812e843f9ecb8fbe76b3d32e89b5a17674511 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 14 Jun 2015 21:37:39 -0400 Subject: SHERLOCK: RT: Fix walking with segments more than 10 steps long --- engines/sherlock/tattoo/tattoo_people.cpp | 3 ++- engines/sherlock/tattoo/tattoo_people.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp index 30a87ce7e0..b582b86dbc 100644 --- a/engines/sherlock/tattoo/tattoo_people.cpp +++ b/engines/sherlock/tattoo/tattoo_people.cpp @@ -128,7 +128,7 @@ void TattooPerson::adjustSprite() { setWalking(); } else if (_type == CHARACTER && _walkCount) { if (_walkCount > 10) { - _walkDest = _walkTo.front(); + _walkDest = _nextDest; setWalking(); } @@ -315,6 +315,7 @@ void TattooPerson::setWalking() { TattooScene &scene = *(TattooScene *)_vm->_scene; int oldDirection, oldFrame; Common::Point delta; + _nextDest = _walkDest; // Flag that player has now walked in the scene scene._walkedInScene = true; diff --git a/engines/sherlock/tattoo/tattoo_people.h b/engines/sherlock/tattoo/tattoo_people.h index 5fb94cc559..eff90388e8 100644 --- a/engines/sherlock/tattoo/tattoo_people.h +++ b/engines/sherlock/tattoo/tattoo_people.h @@ -72,6 +72,8 @@ enum TattooSequences { }; class TattooPerson: public Person { +private: + Point32 _nextDest; private: bool checkCollision() const; -- cgit v1.2.3