[Scummvm-git-logs] scummvm master -> 572dbd86239426c54776f02a538f1bea45f4abd3
dreammaster
dreammaster at scummvm.org
Sat Mar 31 17:43:13 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:
572dbd8623 XEEN: Armor breaks at -10 HP, not 10 HP
Commit: 572dbd86239426c54776f02a538f1bea45f4abd3
https://github.com/scummvm/scummvm/commit/572dbd86239426c54776f02a538f1bea45f4abd3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-31T11:43:11-04:00
Commit Message:
XEEN: Armor breaks at -10 HP, not 10 HP
Changed paths:
engines/xeen/character.cpp
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp
index 72d8ed6..2eb37bc 100644
--- a/engines/xeen/character.cpp
+++ b/engines/xeen/character.cpp
@@ -1222,7 +1222,7 @@ void Character::subtractHitPoints(int amount) {
// Subtract the given HP amount
_currentHp -= amount;
- bool flag = _currentHp <= 10;
+ bool breakFlag = _currentHp <= -10;
assert(_currentHp < 65000);
if (_currentHp < 1) {
@@ -1232,13 +1232,13 @@ void Character::subtractHitPoints(int amount) {
sound.playFX(38);
} else {
_conditions[DEAD] = 1;
- flag = true;
+ breakFlag = true;
if (_currentHp > 0)
_currentHp = 0;
}
- if (flag) {
- // Check for breaking equipped armor
+ if (breakFlag) {
+ // Break any equipped armor the character has
for (int idx = 0; idx < INV_ITEMS_TOTAL; ++idx) {
XeenItem &item = _armor[idx];
if (item._id && item._frame)
More information about the Scummvm-git-logs
mailing list