mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-05-11 11:33:56 +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);
|
dsq->tilemgr.exportGridFillers(fillers);
|
||||||
|
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << "ReconstructGrid using " << fillers.size() << " tiles";
|
os << "ReconstructGrid using " << fillers.size() << " solid tiles";
|
||||||
debugLog(os.str());
|
debugLog(os.str());
|
||||||
|
|
||||||
for (size_t i = 0; i < fillers.size(); i++)
|
for (size_t i = 0; i < fillers.size(); i++)
|
||||||
|
@ -1802,6 +1802,14 @@ next_SE:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Game::handleEditorMapGridUpdate()
|
||||||
|
{
|
||||||
|
reconstructGrid(true);
|
||||||
|
findMaxCameraValues();
|
||||||
|
updateGridRender(OT_MASK_BLACK);
|
||||||
|
}
|
||||||
|
|
||||||
void Game::spawnEntities(const EntitySaveData *sav, size_t n)
|
void Game::spawnEntities(const EntitySaveData *sav, size_t n)
|
||||||
{
|
{
|
||||||
std::vector<size_t> conflicting, usable;
|
std::vector<size_t> conflicting, usable;
|
||||||
|
|
|
@ -400,6 +400,8 @@ public:
|
||||||
void onContinuityReset();
|
void onContinuityReset();
|
||||||
void onPrepareRender();
|
void onPrepareRender();
|
||||||
|
|
||||||
|
void handleEditorMapGridUpdate();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
unsigned highestLoadedEntityID;
|
unsigned highestLoadedEntityID;
|
||||||
|
|
||||||
|
|
|
@ -1623,8 +1623,7 @@ void SceneEditor::generateLevel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
game->reconstructGrid(true);
|
game->handleEditorMapGridUpdate();
|
||||||
game->updateGridRender(OT_MASK_BLACK);
|
|
||||||
|
|
||||||
maxX--;
|
maxX--;
|
||||||
maxY--;
|
maxY--;
|
||||||
|
|
Loading…
Add table
Reference in a new issue