diff options
author | Max Horn | 2003-05-24 16:09:29 +0000 |
---|---|---|
committer | Max Horn | 2003-05-24 16:09:29 +0000 |
commit | 41df21ed6b898286759510c9b5239213b48abf41 (patch) | |
tree | 73f8c1da2e9b4fea14b7c672fedb88ab4d8b32db | |
parent | ac3f8719105d32d8b63eb501a9eda98b36df5212 (diff) | |
download | scummvm-rg350-41df21ed6b898286759510c9b5239213b48abf41.tar.gz scummvm-rg350-41df21ed6b898286759510c9b5239213b48abf41.tar.bz2 scummvm-rg350-41df21ed6b898286759510c9b5239213b48abf41.zip |
temporary work around for bug #742676 (game won't exit anymore, but behaviour is incorrect)
svn-id: r7889
-rw-r--r-- | scumm/script_v6.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 861c014f60..50cf973a5a 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -1003,7 +1003,16 @@ void Scumm_v6::o6_walkActorToObj() { getObjectXYPos(obj, x, y, dir); a->startWalkActor(x, y, dir); } else { - a2 = derefActor(obj, "o6_walkActorToObj(2)"); + a2 = derefActorSafe(obj, "o6_walkActorToObj(2)"); + if (a2 == 0) { + // FIXME: This is a hack to work around bug #742676 SAM: Fish Farm. + // However, that this ever happens seems to be due to a bug in + // ScummVM, esp. since even with this hack the behaviour of Sam + // is not correct (when using the fish he says "This is a completely + // unusable thingamabob", but should say "Wow, he's blowing bubbles". + warning("o6_walkActorToObj: invalid actor %d\n", obj); + return; + } if (!a->isInCurrentRoom() || !a2->isInCurrentRoom()) return; if (dist == 0) { @@ -1081,15 +1090,15 @@ void Scumm_v6::o6_animateActor() { } void Scumm_v6::o6_doSentence() { - int a, b, c; + int verb, objectA, objectB, dummy = 0; - a = pop(); + objectB = pop(); if (!(_features & GF_AFTER_V8)) - pop(); // dummy pop - b = pop(); - c = pop(); + dummy = pop(); // dummy pop + objectA = pop(); + verb = pop(); - doSentence(c, b, a); + doSentence(verb, objectA, objectB); } void Scumm_v6::o6_pickupObject() { |