Skip to content
Permalink
Browse files

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
  • Loading branch information
dreammaster committed Apr 14, 2018
1 parent 8a1a3c5 commit a189f2c7d2f2cb207c98b7e950c0f7ef97f94eb2
Showing with 3 additions and 3 deletions.
  1. +2 −2 engines/xeen/combat.cpp
  2. +1 −1 engines/xeen/dialogs/dialogs_input.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;
}
@@ -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;
}
}

0 comments on commit a189f2c

Please sign in to comment.
You can’t perform that action at this time.