[Scummvm-git-logs] scummvm master -> a189f2c7d2f2cb207c98b7e950c0f7ef97f94eb2

dreammaster dreammaster at scummvm.org
Sat Apr 14 17:07:25 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a189f2c7d2 XEEN: Fix aborting combat loop prematurely via bad sleeping check


Commit: a189f2c7d2f2cb207c98b7e950c0f7ef97f94eb2
    https://github.com/scummvm/scummvm/commit/a189f2c7d2f2cb207c98b7e950c0f7ef97f94eb2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-14T11:05:11-04:00

Commit Message:
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

Changed paths:
    engines/xeen/combat.cpp
    engines/xeen/dialogs/dialogs_input.cpp


diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index 21a743b..adc7643 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 6092fc4..764d772 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;
 		}
 	}
 





More information about the Scummvm-git-logs mailing list