[Scummvm-git-logs] scummvm master -> 9f7c4f6f1eb5368e56bc57dfa72ce7d1ad94c9b5

athrxx athrxx at scummvm.org
Tue Nov 6 23:36:58 CET 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:
9f7c4f6f1e KYRA: (EOB) - fix bug in dispel magic spell


Commit: 9f7c4f6f1eb5368e56bc57dfa72ce7d1ad94c9b5
    https://github.com/scummvm/scummvm/commit/9f7c4f6f1eb5368e56bc57dfa72ce7d1ad94c9b5
Author: athrxx (athrxx at scummvm.org)
Date: 2018-11-06T23:35:57+01:00

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

Changed paths:
    engines/kyra/magic_eob.cpp


diff --git a/engines/kyra/magic_eob.cpp b/engines/kyra/magic_eob.cpp
index a435850..52bca46 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();





More information about the Scummvm-git-logs mailing list