From db98e79e1db304861e08e30943f2b4d065749c9e Mon Sep 17 00:00:00 2001 From: fgenesis Date: Sun, 12 May 2024 17:48:19 +0200 Subject: [PATCH] update gridrender immediately if visible this fixes extra gridrenders (ie. for hurt or tile collision) showing stale data when in the middle of setting tile properties while the gridrender was displayed. --- Aquaria/Game.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Aquaria/Game.cpp b/Aquaria/Game.cpp index 56237b6..3da0209 100644 --- a/Aquaria/Game.cpp +++ b/Aquaria/Game.cpp @@ -4044,7 +4044,12 @@ void Game::toggleGridRender() static void checkgridrender(GridRender *gr, ObsType obs) { if(gr->getObs() & obs) - gr->markForRebuild(); + { + if(gr->alpha.x) + gr->rebuildBuffers(); + else + gr->markForRebuild(); + } } void Game::updateGridRender(ObsType obs)