diff options
-rw-r--r-- | engines/bladerunner/obstacles.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/bladerunner/obstacles.cpp b/engines/bladerunner/obstacles.cpp index 9a8792e361..6e038b9719 100644 --- a/engines/bladerunner/obstacles.cpp +++ b/engines/bladerunner/obstacles.cpp @@ -284,12 +284,20 @@ restart: continue; } + if (polyA.verticeCount == 0) { + continue; + } + for (int j = i+1; j < kPolygonCount; ++j) { Polygon &polyB = _polygons[j]; if (!polyB.isPresent) { continue; } + if (polyB.verticeCount == 0) { + continue; + } + if (!overlaps(polyA.rect, polyB.rect)) { continue; } |