Skip to content

Commit

Permalink
More angled collision fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
vchelaru committed Dec 30, 2023
1 parent d5796c7 commit 92edd2d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,12 @@ private static void ApplyFlip(uint idWithFlip, Polygon cloned)
out bool flipVertically,
out bool flipDiagonally);

// If we flip, it needs to be made clockwise, but if we flip 2x, it automatically reverts
// back to being clockwise
var shouldMakeClockwise = false;
if (flipDiagonally)
{
shouldMakeClockwise = !shouldMakeClockwise;
for (int i = 0; i < cloned.Points.Count; i++)
{
Point point = cloned.Points[i];
Expand All @@ -858,9 +862,6 @@ private static void ApplyFlip(uint idWithFlip, Polygon cloned)
cloned.SetPoint(i, point);
}
}
// If we flip, it needs to be made clockwise, but if we flip 2x, it automatically reverts
// back to being clockwise
var shouldMakeClockwise = false;
if (flipHorizontally)
{
shouldMakeClockwise = !shouldMakeClockwise;
Expand Down

0 comments on commit 92edd2d

Please sign in to comment.