fix(editor): generateCompleteZone honors active biome

Previously generateCompleteZone() applied a hardcoded heightband
texture set (Tanaris sand → Elwynn grass → Barrens rock →
Dragonblight snow) regardless of which biome the user picked in the
"New Terrain" dialog. The biome's textures were correctly applied
by createNewTerrain, then immediately overwritten by the
hardcoded auto-paint pass. Result: every "Create + Generate" run
looked the same, masquerading as "the first biome sticks."

Fix: store the active biome on EditorApp and read it in
generateCompleteZone(), pulling the four-band texture set + slope
accent from getBiomeTextures() instead of hardcoding. Now selecting
Forest vs Desert vs Snow vs ... actually changes the painted
textures.
This commit is contained in:
Kelsi 2026-05-07 09:19:08 -07:00
parent 7ce5aac3e5
commit c2eec42eb8
2 changed files with 19 additions and 7 deletions

View file

@ -3,6 +3,7 @@
#include "editor_camera.hpp"
#include "editor_viewport.hpp"
#include "editor_ui.hpp"
#include "terrain_biomes.hpp"
#include "terrain_editor.hpp"
#include "texture_painter.hpp"
#include "object_placer.hpp"
@ -185,6 +186,11 @@ private:
std::string loadedMap_;
int loadedTileX_ = -1;
int loadedTileY_ = -1;
// Last biome the user selected via createNewTerrain. generateCompleteZone()
// reads this so subsequent generations honor the active biome instead of
// reapplying the same hardcoded heightband textures every time.
Biome activeBiome_ = Biome::Grassland;
};
} // namespace editor