1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 12:58:33 +01:00

also switch order of x and y iteration in GetCollidingTiles

This commit is contained in:
Ell 2021-03-07 20:59:10 +01:00
parent f2df639f9e
commit 6ef9f8ffb1

View file

@ -87,8 +87,8 @@ namespace MLEM.Extended.Tiled {
var minY = Math.Max(0, area.Top.Floor()); var minY = Math.Max(0, area.Top.Floor());
var maxY = Math.Min(this.map.Height - 1, area.Bottom.Floor()); var maxY = Math.Min(this.map.Height - 1, area.Bottom.Floor());
for (var i = 0; i < this.map.TileLayers.Count; i++) { for (var i = 0; i < this.map.TileLayers.Count; i++) {
for (var x = minX; x <= maxX; x++) { for (var y = maxY; y >= minY; y--) {
for (var y = maxY; y >= minY; y--) { for (var x = minX; x <= maxX; x++) {
var tile = this.collisionInfos[i, x, y]; var tile = this.collisionInfos[i, x, y];
if (tile == null) if (tile == null)
continue; continue;