aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/obstacles.h
diff options
context:
space:
mode:
authorThanasis Antoniou2019-03-09 23:15:18 +0200
committerThanasis Antoniou2019-03-09 23:17:09 +0200
commitc60c0c967651422a4d2027c3b7c156bfcfc548d3 (patch)
tree07b387a47554cb4eb070fd8e134c2105266dbfff /engines/bladerunner/obstacles.h
parent05dcd7ff2316caffe54d97ec3677512678dd8733 (diff)
downloadscummvm-rg350-c60c0c967651422a4d2027c3b7c156bfcfc548d3.tar.gz
scummvm-rg350-c60c0c967651422a4d2027c3b7c156bfcfc548d3.tar.bz2
scummvm-rg350-c60c0c967651422a4d2027c3b7c156bfcfc548d3.zip
BLADERUNNER: Alternate fix method for rare path finding assert faults
Disabled by default. This one allows polygons merged on a single point.
Diffstat (limited to 'engines/bladerunner/obstacles.h')
-rw-r--r--engines/bladerunner/obstacles.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/bladerunner/obstacles.h b/engines/bladerunner/obstacles.h
index af17184393..9cec3d4f15 100644
--- a/engines/bladerunner/obstacles.h
+++ b/engines/bladerunner/obstacles.h
@@ -71,7 +71,7 @@ class Obstacles {
bool _backup;
static bool lineLineIntersection(LineSegment a, LineSegment b, Vector2 *intersectionPoint);
- static bool linePolygonIntersection(LineSegment lineA, VertexType lineAType, Polygon *polyB, Vector2 *intersectionPoint, int *intersectionIndex);
+ static bool linePolygonIntersection(LineSegment lineA, VertexType lineAType, Polygon *polyB, Vector2 *intersectionPoint, int *intersectionIndex, int pathLengthSinceLastIntersection);
bool mergePolygons(Polygon &polyA, Polygon &PolyB);
@@ -93,7 +93,7 @@ public:
float pathTotalDistance(const Vector2 *path, int pathSize, Vector2 from, Vector2 to) const;
bool findPolygonVerticeByXZ(int *polygonIndex, int *verticeIndex, int *verticeCount, float x, float z) const;
- bool findPolygonVerticeByXZWithinTolerance(float x, float z, int *polygonIndex, int *verticeIndex) const;
+ bool findPolygonVerticeByXZWithinTolerance(float x, float z, int *polygonIndex, int *verticeIndex, int startSearchFromPolygonIdx) const;
void clearPath();
int buildNegativePath(int polyIndex, int vertStartIndex, Vector2 startPos, int vertEndIndex, Vector2 endPos, Vector2 *path, int pathCapacity, bool *pathBlocked);