From e7ba09be63a556236bd19c5e89faa524289aced9 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sat, 28 Apr 2012 23:48:31 +0200 Subject: KYRA: fix bug No. VI. from http://forums.scummvm.org/viewtopic.php?t=11487 (Vaelan's Cube should be able to remove illusionary walls) --- engines/kyra/lol.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/kyra') diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index d7ec965312..d3028c5e2d 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -2894,11 +2894,11 @@ int LoLEngine::processMagicVaelansCube() { uint8 s = _levelBlockProperties[bl].walls[_currentDirection ^ 2]; uint8 flg = _wllWallFlags[s]; - int v = (s == 47 && (_currentLevel == 17 || _currentLevel == 24)) ? 1 : 0; - if ((_wllVmpMap[s] == 1 || _wllVmpMap[s] == 2) && (flg & 1) && (_currentLevel == 22)) { + int res = (s == 47 && (_currentLevel == 17 || _currentLevel == 24)) ? 1 : 0; + if ((_wllVmpMap[s] == 1 || _wllVmpMap[s] == 2) && (!(flg & 1)) && (_currentLevel != 22)) { memset(_levelBlockProperties[bl].walls, 0, 4); gui_drawScene(0); - v = 1; + res = 1; } uint16 o = _levelBlockProperties[bl].assignedObjects; @@ -2906,7 +2906,7 @@ int LoLEngine::processMagicVaelansCube() { LoLMonster *m = &_monsters[o & 0x7fff]; if (m->properties->flags & 0x1000) { inflictDamage(o, 100, 0xffff, 0, 0x80); - v = 1; + res = 1; } o = m->nextAssignedObject; } @@ -2922,7 +2922,7 @@ int LoLEngine::processMagicVaelansCube() { delete[] tmpPal1; delete[] tmpPal2; - return v; + return res; } int LoLEngine::processMagicGuardian(int charNum) { -- cgit v1.2.3