mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-02 14:46:28 -05:00
DS1.Tile() now calls update if dirty
This commit is contained in:
parent
2353ef2e70
commit
4bc4fa0221
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user