diff options
author | Paul Gilbert | 2018-04-14 11:05:11 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-04-14 11:05:11 -0400 |
commit | a189f2c7d2f2cb207c98b7e950c0f7ef97f94eb2 (patch) | |
tree | 758b88fe5b22d091936a9ae2cc3ee4a7ae2b6168 /engines | |
parent | 8a1a3c55740f8b77e29762166df7fc4b1af2fab3 (diff) | |
download | scummvm-rg350-a189f2c7d2f2cb207c98b7e950c0f7ef97f94eb2.tar.gz scummvm-rg350-a189f2c7d2f2cb207c98b7e950c0f7ef97f94eb2.tar.bz2 scummvm-rg350-a189f2c7d2f2cb207c98b7e950c0f7ef97f94eb2.zip |
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
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/combat.cpp | 4 | ||||
-rw-r--r-- | 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; } } |