[Scummvm-git-logs] scummvm master -> 2eb6bba7bd5240f0e97a03f55da96967ef2ac4f1

sev- sev at scummvm.org
Tue Jan 15 01:28:38 CET 2019


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:
2eb6bba7bd BLADERUNNER: Disable pathfinding by default.


Commit: 2eb6bba7bd5240f0e97a03f55da96967ef2ac4f1
    https://github.com/scummvm/scummvm/commit/2eb6bba7bd5240f0e97a03f55da96967ef2ac4f1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2019-01-15T01:28:07+01:00

Commit Message:
BLADERUNNER: Disable pathfinding by default.

So, peterkohaut could continue his debugging sessions.

Changed paths:
    engines/bladerunner/obstacles.cpp


diff --git a/engines/bladerunner/obstacles.cpp b/engines/bladerunner/obstacles.cpp
index 73b3681..9a8792e 100644
--- a/engines/bladerunner/obstacles.cpp
+++ b/engines/bladerunner/obstacles.cpp
@@ -32,6 +32,8 @@
 
 #include "common/debug.h"
 
+#define DISABLE_PATHFINDING 1
+
 #define WITHIN_TOLERANCE(a, b) (((a) - 0.009) < (b) && ((a) + 0.009) > (b))
 
 namespace BladeRunner {
@@ -315,6 +317,14 @@ float Obstacles::getLength(float x0, float z0, float x1, float z1) {
 	return fabs(x1 - x0);
 }
 
+#if DISABLE_PATHFINDING
+bool Obstacles::findNextWaypoint(const Vector3 &from, const Vector3 &to, Vector3 *next) {
+	*next = to;
+
+	return true;
+}
+#else
+
 bool Obstacles::findNextWaypoint(const Vector3 &from, const Vector3 &to, Vector3 *next) {
 	static int  recursionLevel = 0;
 	static bool polygonVisited[kPolygonCount];
@@ -426,6 +436,7 @@ bool Obstacles::findNextWaypoint(const Vector3 &from, const Vector3 &to, Vector3
 	*next = Vector3(_path[0].x, from.y, _path[0].y);
 	return true;
 }
+#endif
 
 bool Obstacles::findIntersectionNearest(int polygonIndex, Vector2 from, Vector2 to,
                                         int *outVertexIndex, float *outDistance, Vector2 *out) const





More information about the Scummvm-git-logs mailing list