diff options
Diffstat (limited to 'queen')
-rw-r--r-- | queen/command.cpp | 21 | ||||
-rw-r--r-- | queen/logic.cpp | 3 |
2 files changed, 11 insertions, 13 deletions
diff --git a/queen/command.cpp b/queen/command.cpp index 302db35072..8b0636c82c 100644 --- a/queen/command.cpp +++ b/queen/command.cpp @@ -434,18 +434,19 @@ int16 Command::makeJoeWalkTo(int16 x, int16 y, int16 objNum, Verb v, bool mustWa if (v == VERB_WALK_TO) { _vm->logic()->entryObj(objData->entryObj); - if (objData->entryObj != 0) { - _vm->logic()->newRoom(_vm->logic()->objectData(objData->entryObj)->room); - // because this is an exit object, see if there is - // a walk off point and set (x,y) accordingly - WalkOffData *wod = _vm->logic()->walkOffPointForObject(objNum); - if (wod != NULL) { - x = wod->x; - y = wod->y; - } - } } else { _vm->logic()->entryObj(0); + } + if (objData->entryObj > 0 && v != VERB_CLOSE) { + _vm->logic()->newRoom(_vm->logic()->objectData(objData->entryObj)->room); + // because this is an exit object, see if there is + // a walk off point and set (x,y) accordingly + WalkOffData *wod = _vm->logic()->walkOffPointForObject(objNum); + if (wod != NULL) { + x = wod->x; + y = wod->y; + } + } else { _vm->logic()->newRoom(0); } diff --git a/queen/logic.cpp b/queen/logic.cpp index 38c9a23112..dac66f6547 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -608,9 +608,6 @@ ObjectData *Logic::setupJoeInRoom(bool autoPosition, uint16 scale) { debug(9, "Logic::setupJoeInRoom(%d, %d) joe.x=%d joe.y=%d", autoPosition, scale, _joe.x, _joe.y); WalkOffData *pwo = NULL; ObjectData *pod = objectData(_entryObj); - if (pod == NULL) { - error("Logic::setupJoeInRoom() - No object data for obj %d", _entryObj); - } uint16 oldx, oldy; if (!autoPosition || joeX() != 0 || joeY() != 0) { |