From c67485254a612b0d247c7adbf888ef6772f386c6 Mon Sep 17 00:00:00 2001 From: Jamieson Christian Date: Sat, 16 Aug 2003 15:13:15 +0000 Subject: 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 --- scumm/script_v5.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scumm') 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(); } -- cgit v1.2.3