1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 17:53:47 +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,8 +4044,13 @@ 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)
{
if(gr->alpha.x)
gr->rebuildBuffers();
else
gr->markForRebuild(); gr->markForRebuild();
} }
}
void Game::updateGridRender(ObsType obs) void Game::updateGridRender(ObsType obs)
{ {