aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorJamieson Christian2003-08-16 15:13:15 +0000
committerJamieson Christian2003-08-16 15:13:15 +0000
commitc67485254a612b0d247c7adbf888ef6772f386c6 (patch)
tree60c44250f1253740d574ce7db388bf51a8c04f8f /scumm
parent87542e0edfb8df47090a703fa64b42e0ec356a77 (diff)
downloadscummvm-rg350-c67485254a612b0d247c7adbf888ef6772f386c6.tar.gz
scummvm-rg350-c67485254a612b0d247c7adbf888ef6772f386c6.tar.bz2
scummvm-rg350-c67485254a612b0d247c7adbf888ef6772f386c6.zip
Fixed hang in MI1 EGA Demo. Hang was the result
of a conflict between two scripts trying to putActorInRoom() on the same actor. One script was trying to reset an actor which had already been appropriated and set up by another script. A warning is displayed when putActorInRoom() is ignored, just in case this crops up in other games and causes undesirable behavior. (I tested with MI2 up until Woodtick, and didn't encounter any places where the opcode had to be ignored.) svn-id: r9727
Diffstat (limited to 'scumm')
-rw-r--r--scumm/script_v5.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp
index 110fd39261..9fab799e60 100644
--- a/scumm/script_v5.cpp
+++ b/scumm/script_v5.cpp
@@ -1462,6 +1462,11 @@ void Scumm_v5::o5_putActorInRoom() {
a = derefActor(act, "o5_putActorInRoom");
+ if (room == 0 && a->room != _currentRoom && a->room != room && _currentRoom != room) {
+ warning ("o5_putActorInRoom (%d [%d], %d) ignored", act, a->room, room);
+ return;
+ }
+
if (a->visible && _currentRoom != room && VAR(VAR_TALK_ACTOR) == a->number) {
clearMsgQueue();
}