diff options
| author | Gregory Montoir | 2003-12-01 22:16:31 +0000 |
|---|---|---|
| committer | Gregory Montoir | 2003-12-01 22:16:31 +0000 |
| commit | 03e70632b2511eeb760bc8c2e9e5f0202c795233 (patch) | |
| tree | 18f14eba7eaebbaf9cac7a2a42fe90682f0c574a /queen/command.cpp | |
| parent | 57efe0438f25e57d58498ab225b6025033218a59 (diff) | |
| download | scummvm-rg350-03e70632b2511eeb760bc8c2e9e5f0202c795233.tar.gz scummvm-rg350-03e70632b2511eeb760bc8c2e9e5f0202c795233.tar.bz2 scummvm-rg350-03e70632b2511eeb760bc8c2e9e5f0202c795233.zip | |
fix bug in command code, letting a failed command being executed
svn-id: r11452
Diffstat (limited to 'queen/command.cpp')
| -rw-r--r-- | queen/command.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/queen/command.cpp b/queen/command.cpp index bf9424cbad..80ada1b27c 100644 --- a/queen/command.cpp +++ b/queen/command.cpp @@ -263,9 +263,15 @@ void Command::executeCurrentAction(bool walk) { if (_selCmd.action.value() == VERB_LOOK_AT) { // Look At, do standard look at routine look(); - cleanupCurrentAction(); - return; } + else { + if (com->song < 0) { + _sound->playSong(-com->song); + } + clear(true); + } + cleanupCurrentAction(); + return; } else if (cond == -2 && i == comMax) { // only exit on a condition fail if at last command @@ -424,7 +430,7 @@ void Command::executeCurrentAction(bool walk) { // only play song if it's a PLAY AFTER type if (com->song < 0) { - _sound->playSong(com->song); + _sound->playSong(-com->song); } clear(true); |
