Browse Source

Prevent erroneous diagonal traversal in span filling algorithm

pull/3797/head
staphen 4 years ago committed by Anders Jenbo
parent
commit
a6458d2716
  1. 3
      Source/gendung.cpp

3
Source/gendung.cpp

@ -360,7 +360,8 @@ void FindTransparencyValues(Point floor, uint8_t floorID)
seedStack.push(std::make_tuple(scanLeft, scanRight - 1, y + dy, dy));
if (scanRight - 1 > scanEnd)
seedStack.push(std::make_tuple(scanEnd + 1, scanRight - 1, y - dy, -dy));
checkDiagonals({ scanRight - 1, y }, right);
if (scanLeft < scanRight)
checkDiagonals({ scanRight - 1, y }, right);
while (scanRight < scanEnd && !isInside(scanRight, y))
scanRight++;

Loading…
Cancel
Save