mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 06:28:35 +01:00
also switch order of x and y iteration in GetCollidingTiles
This commit is contained in:
parent
f2df639f9e
commit
6ef9f8ffb1
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue