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:
parent
a5b25af6d5
commit
b54d8d05ac
2 changed files with 6 additions and 2 deletions
|
@ -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()
|
||||
|
|
|
@ -33,6 +33,7 @@ enum ObsType
|
|||
OT_USER_MASK = OT_USER1 | OT_USER2,
|
||||
|
||||
OT_OUTOFBOUNDS = 0xff, // all bits set
|
||||
OT_MASK_ALL = 0xff
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue