aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-15 13:47:43 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-15 13:47:43 +0200
commitee2aedc27eeb8c0c50bf662dfa3a2dcdcdb3ff91 (patch)
tree0fe2266b507250a0005d9f760e60e0362970eb38
parentd33b8f7b781aada0c1082ee426fca65c6f1747dd (diff)
immediately update tile when canvas is paused
-rw-r--r--TileDecayCommand.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/TileDecayCommand.cpp b/TileDecayCommand.cpp
index 9497121..e986cc5 100644
--- a/TileDecayCommand.cpp
+++ b/TileDecayCommand.cpp
@@ -5,6 +5,8 @@ void TileDecayCommand::execute(unsigned int x, unsigned int y) {
Museum & museum = this->get_museum();
if (x >= museum.canvas.data.columns) return;
if (y >= museum.canvas.data.rows) return;
- museum.canvas.get_tile(x, y).step(nullptr);
+ Tile & tile = museum.canvas.get_tile(x, y);
+ tile.step(nullptr);
+ tile.update();
}