1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-07-05 20:55:23 +00:00

DS1.Tile() now calls update if dirty

This commit is contained in:
gravestench 2021-02-17 10:57:38 -08:00
parent 8a5148647b
commit 169521e546

View File

@ -140,6 +140,10 @@ func (ds1 *DS1) SetTiles(tiles [][]Tile) {
// Tile returns the tile at the given x,y tile coordinate (nil if x,y is out of bounds)
func (ds1 *DS1) Tile(x, y int) *Tile {
if ds1.dirty {
ds1.update()
}
if y >= len(ds1.tiles) {
return nil
}