mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-02 22:57:04 -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)
|
// 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 {
|
func (ds1 *DS1) Tile(x, y int) *Tile {
|
||||||
|
if ds1.dirty {
|
||||||
|
ds1.update()
|
||||||
|
}
|
||||||
|
|
||||||
if y >= len(ds1.tiles) {
|
if y >= len(ds1.tiles) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user