fix tilemap import

a bug caused the tilemap to protect the wrong tiles
This commit is contained in:
haven1433 2023-01-25 20:54:08 -06:00
parent 303bb131a3
commit 18cd3d4528

View File

@ -213,7 +213,7 @@ namespace HavenSoft.HexManiac.Core.Models.Runs.Sprites {
int x = i % tileWidth;
if (y >= tileHeight) break;
if (previousTiles.Count <= originalTilemap[i]) break;
if (TilesMatch(previousTiles[originalTilemap[i]], tileData[x, y].pixels, flipPossible: false) == TileMatchType.Normal) tilesToKeep.Add(i);
if (TilesMatch(previousTiles[originalTilemap[i]], tileData[x, y].pixels, flipPossible: false) == TileMatchType.Normal) tilesToKeep.Add(originalTilemap[i]);
}
tiles = MergeTilesets(previousTiles, tilesToKeep, tiles, run.BytesPerTile == 2);