1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00

correctly update VBO of GridRender(OT_BLACK) after trimGrid()

This fixes blackness showing occasionally even though it was no longer there
This commit is contained in:
fgenesis 2024-07-08 03:54:00 +02:00
parent a5b25af6d5
commit b54d8d05ac
2 changed files with 6 additions and 2 deletions

View file

@ -547,6 +547,9 @@ void Game::reconstructEntityGrid()
updateGridRender(OT_INVISIBLEENT);
}
// TODO: ideally this would be split into two functions, one that reconstructs blackness
// and is called on map load or by the editor, and another one that just reconstructs
// the dynamic parts of the grid.
void Game::reconstructGrid(bool force)
{
if (!force && isSceneEditorActive()) return;
@ -581,8 +584,8 @@ void Game::reconstructGrid(bool force)
trimGrid();
// This does intentionally not update black.
updateGridRender(OT_MASK_NOTBLACK);
// Must update OT_BLACK after trimGrid()
updateGridRender(OT_MASK_ALL);
}
void Game::trimGrid()

View file

@ -33,6 +33,7 @@ enum ObsType
OT_USER_MASK = OT_USER1 | OT_USER2,
OT_OUTOFBOUNDS = 0xff, // all bits set
OT_MASK_ALL = 0xff
};