diff --git a/queen/command.cpp b/queen/command.cpp index 727dd6b9e37..e0527e38874 100644 --- a/queen/command.cpp +++ b/queen/command.cpp @@ -247,14 +247,12 @@ void Command::executeCurrentAction(bool walk) { } else if (cond >= 0) { // we've had a successful Gamestate check, so we must now exit - executeCommand(comId, cond); + cond = executeCommand(comId, cond); break; } } - - if (_selCmd.action.value() == VERB_LOOK_AT) { - // Look At, do standard look at routine + if (cond <= 0 && _selCmd.action.value() == VERB_LOOK_AT) { look(); } else { @@ -358,7 +356,7 @@ void Command::readCommandsFrom(byte *&ptr) { } -void Command::executeCommand(uint16 comId, int16 condResult) { +int16 Command::executeCommand(uint16 comId, int16 condResult) { // execute.c l.313-452 debug(0, "Command::executeCommand() - cond = %X, com = %X", condResult, comId); @@ -448,7 +446,7 @@ void Command::executeCommand(uint16 comId, int16 condResult) { switch (com->specialSection) { case 1: _logic->useJournal(); - return; + return condResult; case 2: _logic->joeUseDress(true); break; @@ -477,6 +475,7 @@ void Command::executeCommand(uint16 comId, int16 condResult) { if (condResult > 0) { _logic->joeSpeak(condResult, true); } + return condResult; } diff --git a/queen/command.h b/queen/command.h index 24d24a5175f..bc4e256445c 100644 --- a/queen/command.h +++ b/queen/command.h @@ -109,7 +109,7 @@ public: private: - void executeCommand(uint16 comId, int16 condResult); + int16 executeCommand(uint16 comId, int16 condResult); int16 makeJoeWalkTo(int16 x, int16 y, int16 objNum, const Verb &v, bool mustWalk); diff --git a/queen/logic.cpp b/queen/logic.cpp index 0396f662f42..950d5921c48 100644 --- a/queen/logic.cpp +++ b/queen/logic.cpp @@ -1908,6 +1908,7 @@ void Logic::playCutaway(const char *cutFile, char *next) { if (next == NULL) { next = nextFile; } + _graphics->textClear(CmdText::COMMAND_Y_POS, CmdText::COMMAND_Y_POS); Cutaway::run(cutFile, next, _graphics, _input, this, _resource, _sound); }