aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorathrxx2018-11-06 23:34:26 +0100
committerathrxx2018-11-06 23:35:57 +0100
commit9f7c4f6f1eb5368e56bc57dfa72ce7d1ad94c9b5 (patch)
tree3fb52d8da7311282eeaba7156fd03857a8e007c9 /engines
parent9b7ed08a9d067af773289869a9460a87217d8bbc (diff)
downloadscummvm-rg350-9f7c4f6f1eb5368e56bc57dfa72ce7d1ad94c9b5.tar.gz
scummvm-rg350-9f7c4f6f1eb5368e56bc57dfa72ce7d1ad94c9b5.tar.bz2
scummvm-rg350-9f7c4f6f1eb5368e56bc57dfa72ce7d1ad94c9b5.zip
KYRA: (EOB) - fix bug in dispel magic spell
This bug would occur when casting dispel magic while the weapon slots were temporarily disabled (from using a weapon etc.). This could lead to permanently disabled slots.
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/magic_eob.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/kyra/magic_eob.cpp b/engines/kyra/magic_eob.cpp
index a435850e54..52bca46a24 100644
--- a/engines/kyra/magic_eob.cpp
+++ b/engines/kyra/magic_eob.cpp
@@ -281,11 +281,10 @@ void EoBCoreEngine::removeAllCharacterEffects(int charIndex) {
memset(c->effectsRemainder, 0, 4);
for (int i = 0; i < 10; i++) {
- if (c->events[i] < 0) {
+ if (c->events[i] < 0)
removeCharacterEffect(-c->events[i], charIndex, 0);
- c->timers[i] = 0;
- c->events[i] = 0;
- }
+ c->timers[i] = 0;
+ c->events[i] = 0;
}
setupCharacterTimers();