aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-14 21:37:39 -0400
committerPaul Gilbert2015-06-14 21:37:39 -0400
commit142812e843f9ecb8fbe76b3d32e89b5a17674511 (patch)
treea08ca2989c4ea2295446e39fc28ba22982c9d9c4
parentdd992772be489b69803c8d00fd66347fe16ad804 (diff)
downloadscummvm-rg350-142812e843f9ecb8fbe76b3d32e89b5a17674511.tar.gz
scummvm-rg350-142812e843f9ecb8fbe76b3d32e89b5a17674511.tar.bz2
scummvm-rg350-142812e843f9ecb8fbe76b3d32e89b5a17674511.zip
SHERLOCK: RT: Fix walking with segments more than 10 steps long
-rw-r--r--engines/sherlock/tattoo/tattoo_people.cpp3
-rw-r--r--engines/sherlock/tattoo/tattoo_people.h2
2 files changed, 4 insertions, 1 deletions
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
@@ -73,6 +73,8 @@ enum TattooSequences {
class TattooPerson: public Person {
private:
+ Point32 _nextDest;
+private:
bool checkCollision() const;
/**