From a189f2c7d2f2cb207c98b7e950c0f7ef97f94eb2 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 14 Apr 2018 11:05:11 -0400 Subject: XEEN: Fix aborting combat loop prematurely via bad sleeping check Previously combat was being aborted prematurely, though it wasn't noticeable in most casees since the next turn combat started up again seamlessly. But there were a few edge cases, such as defeating monsters in a single turn, but having more to the side, where it resulted in the list of active monsters being fought being redrawn with no contents --- engines/xeen/combat.cpp | 4 ++-- engines/xeen/dialogs/dialogs_input.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index 21a743b59f..adc7643bf7 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -633,11 +633,11 @@ void Combat::monstersAttack() { _monstersAttacking = false; - if (_vm->_mode != MODE_SLEEPING) { + if (_vm->_mode == MODE_SLEEPING) { for (uint charNum = 0; charNum < party._activeParty.size(); ++charNum) { Condition condition = party._activeParty[charNum].worstCondition(); - if (condition != ASLEEP && (condition < PARALYZED || condition == NO_CONDITION)) { + if (condition == DEPRESSED || condition == CONFUSED || condition == NO_CONDITION) { _vm->_mode = MODE_1; break; } diff --git a/engines/xeen/dialogs/dialogs_input.cpp b/engines/xeen/dialogs/dialogs_input.cpp index 6092fc4f3e..764d772edc 100644 --- a/engines/xeen/dialogs/dialogs_input.cpp +++ b/engines/xeen/dialogs/dialogs_input.cpp @@ -262,7 +262,7 @@ int Choose123::execute(uint numOptions) { result = 0; } else if (_buttonValue >= Common::KEYCODE_1 && _buttonValue < (Common::KEYCODE_1 + (int)numOptions)) { _buttonValue -= Common::KEYCODE_0; - result = (_buttonValue == numOptions) ? 0 : _buttonValue; + result = (_buttonValue == (int)numOptions) ? 0 : _buttonValue; } } -- cgit v1.2.3