1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 03:33:48 +00:00

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.
This commit is contained in:
fgenesis 2024-05-12 17:48:19 +02:00
parent b4acacf3bc
commit db98e79e1d

View file

@ -4044,7 +4044,12 @@ void Game::toggleGridRender()
static void checkgridrender(GridRender *gr, ObsType obs) static void checkgridrender(GridRender *gr, ObsType obs)
{ {
if(gr->getObs() & obs) if(gr->getObs() & obs)
gr->markForRebuild(); {
if(gr->alpha.x)
gr->rebuildBuffers();
else
gr->markForRebuild();
}
} }
void Game::updateGridRender(ObsType obs) void Game::updateGridRender(ObsType obs)