diff options
author | Paul Gilbert | 2018-04-20 19:59:35 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-04-20 19:59:35 -0400 |
commit | fb5c464572999472df0f6787fd5a1e96c130969e (patch) | |
tree | c1df82b6b4ab6436d4d1f0923cc15ba945afd9b0 | |
parent | a5395edd325722accb752c644f76f77f96cd7065 (diff) | |
download | scummvm-rg350-fb5c464572999472df0f6787fd5a1e96c130969e.tar.gz scummvm-rg350-fb5c464572999472df0f6787fd5a1e96c130969e.tar.bz2 scummvm-rg350-fb5c464572999472df0f6787fd5a1e96c130969e.zip |
XEEN: Fix crash attacking enemies with an Elder weapon
-rw-r--r-- | engines/xeen/combat.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp index 0e1dc9a3a1..3aff7ec730 100644 --- a/engines/xeen/combat.cpp +++ b/engines/xeen/combat.cpp @@ -1452,9 +1452,9 @@ void Combat::attack2(int damage, RangeType rangeType) { intf.draw3d(true); sound.stopSound(); - File powVoc(Common::String::format("pow%d.voc", - POW_WEAPON_VOCS[_attackWeaponId])); - sound.playFX(60 + POW_WEAPON_VOCS[_attackWeaponId]); + int powNum = (_attackWeaponId > XEEN_SLAYER_SWORD) ? 0 : POW_WEAPON_VOCS[_attackWeaponId]; + File powVoc(Common::String::format("pow%d.voc", powNum)); + sound.playFX(60 + powNum); sound.playSound(powVoc, 1); if (monster._hp > damage) { |