[Scummvm-cvs-logs] scummvm master -> e7d4f88a57efc354cceb34e69acada84600c693d

bluegr bluegr at gmail.com
Mon Oct 22 13:11:00 CEST 2012


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:
e7d4f88a57 SCI: Add a workaround for bug #3568452 - "SCI: QFG1VGA - Path finding bug in the forest"


Commit: e7d4f88a57efc354cceb34e69acada84600c693d
    https://github.com/scummvm/scummvm/commit/e7d4f88a57efc354cceb34e69acada84600c693d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2012-10-22T03:17:57-07:00

Commit Message:
SCI: Add a workaround for bug #3568452 - "SCI: QFG1VGA - Path finding bug in the forest"

This workaround has been added for now to stop the game from freezing.
A more correct solution would be to match our pathfinding algorithm
to what SSCI is doing, but with this workaround we can stop the more
immediate problem (game freezing) now.

Changed paths:
    engines/sci/engine/kpathing.cpp



diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp
index 4061795..b839ac5 100644
--- a/engines/sci/engine/kpathing.cpp
+++ b/engines/sci/engine/kpathing.cpp
@@ -1366,7 +1366,16 @@ static void AStar(PathfindingState *s) {
 			// other, while we apply a penalty to paths traversing it.
 			// This difference might lead to problems, but none are
 			// known at the time of writing.
-			if (s->pointOnScreenBorder(vertex->v))
+
+			// WORKAROUND: This check fails in QFG1VGA, room 81 (bug report #3568452).
+			// However, it is needed in other SCI1.1 games, such as LB2. Therefore, we
+			// add this workaround for that scene in QFG1VGA, until our algorithm matches
+			// better what SSCI is doing. With this workaround, QFG1VGA no longer freezes
+			// in that scene.
+			bool qfg1VgaWorkaround = (g_sci->getGameId() == GID_QFG1VGA &&
+									  g_sci->getEngineState()->currentRoomNumber() == 81);
+
+			if (s->pointOnScreenBorder(vertex->v) && !qfg1VgaWorkaround)
 				new_dist += 10000;
 
 			if (new_dist < vertex->costG) {






More information about the Scummvm-git-logs mailing list