From a169876a2f450eb022fb35ad16f3546ee4003f38 Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Sun, 16 Nov 2003 20:31:14 +0000 Subject: Apparently, my previous fix (joe position when switching room) causes trouble when returning from a cutaway with initialRoom != currentRoom. I added a condition, but that's not exactly like the original. Maybe one effect of the missing SETUP_ROOM call in cutaway code. svn-id: r11314 --- queen/cutaway.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'queen') diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index 53acb35dd4..c6e966c52b 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -1337,8 +1337,9 @@ void Cutaway::run(char *nextFilename) { restorePersonData(); debug(0, "_logic->entryObj() = %i", _logic->entryObj()); - if (_logic->entryObj() > 0) + if (_logic->entryObj() > 0) { _initialRoom = _logic->objectData(_logic->entryObj())->room; + } else { // We're not returning to new room, so return to old Joe X,Y coords debug(0, "[Cutaway::run] Moving joe to (%i, %i)", initialJoeX, initialJoeY); @@ -1354,8 +1355,10 @@ void Cutaway::run(char *nextFilename) { _logic->newRoom(_initialRoom); _logic->display()->fullscreen(true); } - _logic->joeX(0); - _logic->joeY(0); + else { + _logic->joeX(0); + _logic->joeY(0); + } } // XXX CUTJOEF=0; -- cgit v1.2.3