aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-08-13 16:38:02 +0000
committerTorbjörn Andersson2003-08-13 16:38:02 +0000
commit2973317f1dca851c20be419e92dc9bdbce8ff53d (patch)
treee5ed4f9087afca53bb47e12fda2c1c568fdbb761
parent5dd554c47a02c02b533180a3556b08ce9b014fc9 (diff)
downloadscummvm-rg350-2973317f1dca851c20be419e92dc9bdbce8ff53d.tar.gz
scummvm-rg350-2973317f1dca851c20be419e92dc9bdbce8ff53d.tar.bz2
scummvm-rg350-2973317f1dca851c20be419e92dc9bdbce8ff53d.zip
Fix for bug #787841 ("SAM: Crash when using retriever on Max"). For
whatever reason, o6_walkActorToObj() was trying to find the coordinates for an object that was marked as being in the inventory. svn-id: r9664
-rw-r--r--scumm/script_v6.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 0c50b13ec3..462c4429f7 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -998,8 +998,11 @@ void Scumm_v6::o6_walkActorToObj() {
a = derefActor(act, "o6_walkActorToObj");
if (obj >= _numActors) {
- if (whereIsObject(obj) == WIO_NOT_FOUND)
+ int wio = whereIsObject(obj);
+
+ if (wio != WIO_FLOBJECT && wio != WIO_ROOM)
return;
+
int dir;
getObjectXYPos(obj, x, y, dir);
a->startWalkActor(x, y, dir);