mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
fix(editor): Create + Generate button now actually runs generation pipeline
- "Create + Generate" was setting a flag but never calling generateCompleteZone() - Now properly chains: create terrain → run full procedural pipeline (noise → smooth → normals → height paint → slope paint → detail → water → beaches) - Uses generateAfterCreate_ flag to defer generation until after terrain is created
This commit is contained in:
parent
bdfadc7e76
commit
d36631d242
2 changed files with 6 additions and 1 deletions
|
|
@ -115,6 +115,10 @@ void EditorUI::processActions(EditorApp& app) {
|
|||
newRequested_ = false;
|
||||
app.createNewTerrain(newMapNameBuf_, newTileX_, newTileY_, newBaseHeight_,
|
||||
static_cast<Biome>(newBiomeIdx_));
|
||||
if (generateAfterCreate_) {
|
||||
generateAfterCreate_ = false;
|
||||
app.generateCompleteZone();
|
||||
}
|
||||
}
|
||||
if (loadRequested_) {
|
||||
loadRequested_ = false;
|
||||
|
|
@ -362,8 +366,8 @@ void EditorUI::renderNewTerrainDialog(EditorApp& /*app*/) {
|
|||
ImGui::SameLine();
|
||||
if (ImGui::Button("Create + Generate", ImVec2(130, 0))) {
|
||||
newRequested_ = true;
|
||||
generateAfterCreate_ = true;
|
||||
showNewDialog_ = false;
|
||||
// Will call generateCompleteZone after terrain is created
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Cancel", ImVec2(80, 0))) showNewDialog_ = false;
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ private:
|
|||
bool showSaveDialog_ = false;
|
||||
bool showHelp_ = false;
|
||||
bool showAbout_ = false;
|
||||
bool generateAfterCreate_ = false;
|
||||
|
||||
char newMapNameBuf_[256] = "CustomZone";
|
||||
int newTileX_ = 32;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue