[Scummvm-cvs-logs] SF.net SVN: scummvm: [30631] scummvm/trunk/engines/agi/op_cmd.cpp

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Fri Jan 25 13:32:39 CET 2008


Revision: 30631
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30631&view=rev
Author:   buddha_
Date:     2008-01-25 04:32:38 -0800 (Fri, 25 Jan 2008)

Log Message:
-----------
Fully fix bug #1660424 (KQ4: Zombie bug). The bug also affected room 18 in addition to the room 16 that was already taken care of in revision 30482.

Revision Links:
--------------
    http://scummvm.svn.sourceforge.net/scummvm/?rev=30482&view=rev

Modified Paths:
--------------
    scummvm/trunk/engines/agi/op_cmd.cpp

Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp	2008-01-24 10:15:01 UTC (rev 30630)
+++ scummvm/trunk/engines/agi/op_cmd.cpp	2008-01-25 12:32:38 UTC (rev 30631)
@@ -1245,7 +1245,7 @@
 	}
 
 	// WORKAROUND: Fixes King's Quest IV's script bug #1660424 (KQ4: Zombie bug).
-	// In the graveyard (Room 16) at night if you had the Obsidian Scarab (Item 4)
+	// In the graveyard (Rooms 16 and 18) at night if you had the Obsidian Scarab (Item 4)
 	// and you were very close to a spot where a zombie was going to rise up from the
 	// ground you could reproduce the bug. Just standing there and letting the zombie
 	// try to rise up the Obsidian Scarab would repel the zombie immediately and that
@@ -1253,10 +1253,11 @@
 	// wouldn't chase Rosella around anymore. If it had worked correctly the zombie
 	// wouldn't have come up at all or it would have come up and gone back down
 	// immediately. The latter approach is the one implemented here.
-	if (g_agi->getGameID() == GID_KQ4 && _v[vCurRoom] == 16 && p2 >= 221 && p2 <= 223) {
-		// Room 16 is a graveyard where three zombies come up at night. It uses logic 16.
+	if (g_agi->getGameID() == GID_KQ4 && (_v[vCurRoom] == 16 || _v[vCurRoom] == 18) && p2 >= 221 && p2 <= 223) {
+		// Rooms 16 and 18 are graveyards where three zombies come up at night. They use logics 16 and 18.
 		// Variables 221-223 are used to save the distance between each zombie and Rosella.
-		// Variables 155, 156 and 162 are used to save the state of each zombie.
+		// Variables 155, 156 and 162 are used to save the state of each zombie in room 16.
+		// Variables 155, 156 and 158 are used to save the state of each zombie in room 18.
 		// Rosella gets turned to a zombie only if any of the zombies is under 10 units away
 		// from her and she doesn't have the Obsidian Scarab (Item 4). Likewise Rosella makes
 		// a zombie go back into the ground if the zombie comes under 15 units away from her
@@ -1265,7 +1266,7 @@
 		// a zombie or the zombie getting turned away by the scarab) we make it appear the
 		// zombie is far away from Rosella if the zombie is not already up and chasing her.
 		enum zombieStates {ZOMBIE_SET_TO_RISE_UP, ZOMBIE_RISING_UP, ZOMBIE_CHASING_EGO};
-		static const uint8 zombieStateVarNumList[] = {155, 156, 162};
+		uint8 zombieStateVarNumList[] = {155, 156, (_v[vCurRoom] == 16) ? 162 : 158};
 		uint8 zombieNum         = p2 - 221;                         // Zombie's number (In range 0-2)
 		uint8 zombieStateVarNum = zombieStateVarNumList[zombieNum]; // Number of the variable containing zombie's state
 		uint8 zombieState       = _v[zombieStateVarNum];            // Zombie's state


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list