mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-18 02:34:57 +00:00
Fix map grid not drawing and tiles not regenerating after editor obs regen (F11)
forgot to get max grid dimensions after clearing and recomputing the grid
This commit is contained in:
parent
0326800940
commit
3adc3f0c99
3 changed files with 12 additions and 3 deletions
|
@ -556,7 +556,7 @@ void Game::reconstructGrid(bool force)
|
|||
dsq->tilemgr.exportGridFillers(fillers);
|
||||
|
||||
std::ostringstream os;
|
||||
os << "ReconstructGrid using " << fillers.size() << " tiles";
|
||||
os << "ReconstructGrid using " << fillers.size() << " solid tiles";
|
||||
debugLog(os.str());
|
||||
|
||||
for (size_t i = 0; i < fillers.size(); i++)
|
||||
|
@ -1802,6 +1802,14 @@ next_SE:
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Game::handleEditorMapGridUpdate()
|
||||
{
|
||||
reconstructGrid(true);
|
||||
findMaxCameraValues();
|
||||
updateGridRender(OT_MASK_BLACK);
|
||||
}
|
||||
|
||||
void Game::spawnEntities(const EntitySaveData *sav, size_t n)
|
||||
{
|
||||
std::vector<size_t> conflicting, usable;
|
||||
|
|
|
@ -400,6 +400,8 @@ public:
|
|||
void onContinuityReset();
|
||||
void onPrepareRender();
|
||||
|
||||
void handleEditorMapGridUpdate();
|
||||
|
||||
protected:
|
||||
unsigned highestLoadedEntityID;
|
||||
|
||||
|
|
|
@ -1623,8 +1623,7 @@ void SceneEditor::generateLevel()
|
|||
}
|
||||
}
|
||||
|
||||
game->reconstructGrid(true);
|
||||
game->updateGridRender(OT_MASK_BLACK);
|
||||
game->handleEditorMapGridUpdate();
|
||||
|
||||
maxX--;
|
||||
maxY--;
|
||||
|
|
Loading…
Add table
Reference in a new issue