diff options
author | Paul Gilbert | 2018-04-07 18:40:47 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-04-07 18:40:47 -0400 |
commit | 54ff19bcf501516555ee37059bf6ac0e6f01baa3 (patch) | |
tree | 8b1ce5a379cfa22f78d9fc623ec16b8ff1586c33 /engines/xeen | |
parent | e5ff44eaf32bb4ca907f2bc4239ecd4332414ac9 (diff) | |
download | scummvm-rg350-54ff19bcf501516555ee37059bf6ac0e6f01baa3.tar.gz scummvm-rg350-54ff19bcf501516555ee37059bf6ac0e6f01baa3.tar.bz2 scummvm-rg350-54ff19bcf501516555ee37059bf6ac0e6f01baa3.zip |
XEEN: Fix double-casting of spells during combat
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/interface.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 1a7900274c..3da5dc7894 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -512,21 +512,18 @@ void Interface::perform() { } break; - case Common::KEYCODE_c: { + case Common::KEYCODE_c: // Cast spell if (_tillMove) { combat.moveMonsters(); draw3d(true); } - int result = CastSpell::show(_vm); - - if (result == 1) { + if (CastSpell::show(_vm) != -1) { chargeStep(); doStepCode(); } break; - } case Common::KEYCODE_i: // Show Info dialog @@ -1442,7 +1439,6 @@ void Interface::doCombat() { Map &map = *_vm->_map; Party &party = *_vm->_party; Scripts &scripts = *_vm->_scripts; - Spells &spells = *_vm->_spells; Sound &sound = *_vm->_sound; Windows &windows = *_vm->_windows; bool upDoorText = _upDoorText; @@ -1556,10 +1552,7 @@ void Interface::doCombat() { case Common::KEYCODE_c: { // Cast spell - int spellId = CastSpell::show(_vm); - if (spellId != -1) { - Character *c = combat._combatParty[combat._whosTurn]; - spells.castSpell(c, (MagicSpell)spellId); + if (CastSpell::show(_vm) != -1) { nextChar(); } else { highlightChar(combat._whosTurn); |