[Scummvm-cvs-logs] CVS: scummvm/sky autoroute.cpp,1.25,1.26

Robert Göffringmann lavosspawn at users.sourceforge.net
Fri Oct 22 10:11:12 CEST 2004


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31146/sky

Modified Files:
	autoroute.cpp 
Log Message:
fix for bug [ 1043047 ] game hangs when foster path busy

Index: autoroute.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/autoroute.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- autoroute.cpp	6 Jan 2004 12:45:32 -0000	1.25
+++ autoroute.cpp	22 Oct 2004 17:05:29 -0000	1.26
@@ -248,8 +248,18 @@
 	if ((startX == destX) && (startY == destY))
 		return 2;
 
-	if (_routeGrid[(destY + 1) * ROUTE_GRID_WIDTH + destX + 1])
-		return 1; // AR destination is an unaccessible block
+	if (_routeGrid[(destY + 1) * ROUTE_GRID_WIDTH + destX + 1]) {
+		if ((cpt == &Sky::SkyCompact::foster) && (cptScreen == 12) && (destX == 2) && (destY == 14)) {
+			/* workaround for Scriptbug #1043047
+			   In screen 12 (the pipe factory) Joey can block Foster's target
+			   coordinates (2/14). This is normally not too tragic, but in the
+			   scene when foster gets thrown out by Lamb (first time you enter
+			   the pipe factory), the game would enter an infinite loop. */
+			_routeGrid[(destY + 1) * ROUTE_GRID_WIDTH + destX + 1] = 0; 
+			// hide this part joey from the grid
+		} else
+			return 1; // AR destination is an unaccessible block
+	}
 
 	if (!calcWalkGrid(startX, startY, destX, destY))
 		return 1; // can't find route to block





More information about the Scummvm-git-logs mailing list