diff options
author | Peter Kohaut | 2019-01-24 17:01:24 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-01-24 22:59:49 +0100 |
commit | 5475bca1e1996977a45c598d61e186f10c407155 (patch) | |
tree | 94f51fd9263a03d295ce93c1975c8b8a70290926 | |
parent | 00c54db83ce72635cd060114f3e53760a49c4fe6 (diff) | |
download | scummvm-rg350-5475bca1e1996977a45c598d61e186f10c407155.tar.gz scummvm-rg350-5475bca1e1996977a45c598d61e186f10c407155.tar.bz2 scummvm-rg350-5475bca1e1996977a45c598d61e186f10c407155.zip |
BLADERUNNER: Skip empty obstacle polygons
It was causing issues in BB07
-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; } |