aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-27 22:17:49 -0400
committerPaul Gilbert2015-06-27 22:17:49 -0400
commitae885686a562d551ed83e5c45af06f3b92f0500f (patch)
tree673b26c6f61525936b67267f25fdd57ae8309279
parent4d1d8e1514919000d9aec5b59801b22294bc1adb (diff)
downloadscummvm-rg350-ae885686a562d551ed83e5c45af06f3b92f0500f.tar.gz
scummvm-rg350-ae885686a562d551ed83e5c45af06f3b92f0500f.tar.bz2
scummvm-rg350-ae885686a562d551ed83e5c45af06f3b92f0500f.zip
SHERLOCK: RT: Fix walking with a very close dest
-rw-r--r--engines/sherlock/tattoo/tattoo_people.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp
index 217064fb4a..b4c96fe22a 100644
--- a/engines/sherlock/tattoo/tattoo_people.cpp
+++ b/engines/sherlock/tattoo/tattoo_people.cpp
@@ -556,14 +556,17 @@ void TattooPerson::walkToCoords(const Point32 &destPos, int destDir) {
_updateNPCPath = false;
// Secondary walking wait loop
- do {
+ bool done = false;
+ while (!done && !_vm->shouldQuit()) {
events.wait(1);
scene.doBgAnim();
// See if we're past the initial goto stand sequence
for (int idx = 0; idx < _frameNumber; ++idx) {
- if (_walkSequences[_sequenceNumber][idx] == 0)
+ if (_walkSequences[_sequenceNumber][idx] == 0) {
+ done = true;
break;
+ }
}
if (events.kbHit()) {
@@ -576,7 +579,7 @@ void TattooPerson::walkToCoords(const Point32 &destPos, int destDir) {
talk._talkToAbort = true;
}
}
- } while (!_vm->shouldQuit());
+ }
if (!isHolmes)
_updateNPCPath = true;