1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-04 06:50:43 +00:00

DS1.Tile() now calls update if dirty

This commit is contained in:
gravestench 2021-02-17 10:57:38 -08:00 committed by Dylan Knuth
parent 2353ef2e70
commit 4bc4fa0221

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
}