Skip to content

Commit

Permalink
Do not apply OverlayRules recursively to stay consist with TileRules.
Browse files Browse the repository at this point in the history
  • Loading branch information
Starkku committed Jul 24, 2020
1 parent d14845a commit 17aca85
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions MapTool/MapTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1182,11 +1182,17 @@ private bool ApplyOverlayConversionRules()
rule.CoordinateFilterY > -1 && rule.CoordinateFilterY != y)
continue;

overlayDataChanged |= ChangeOverlayData(overlayPack, i, x, y, rule.OriginalStartIndex, rule.OriginalEndIndex,
bool overlayPackChanged = ChangeOverlayData(overlayPack, i, x, y, rule.OriginalStartIndex, rule.OriginalEndIndex,
rule.NewStartIndex, rule.NewEndIndex, rule.IsRandomizer, false);

overlayDataChanged |= ChangeOverlayData(overlayDataPack, i, x, y, rule.OriginalStartFrameIndex, rule.OriginalEndFrameIndex,
bool overlayDataPackChanged = ChangeOverlayData(overlayDataPack, i, x, y, rule.OriginalStartFrameIndex, rule.OriginalEndFrameIndex,
rule.NewStartFrameIndex, rule.NewEndFrameIndex, rule.IsFrameRandomizer, true);

if (overlayPackChanged || overlayDataPackChanged)
{
overlayDataChanged = true;
break;
}
}
}
return overlayDataChanged;
Expand Down

0 comments on commit 17aca85

Please sign in to comment.