fix(editor): undo now covers texture painting, fix stale buffer bug

- Extend undo/redo to snapshot alpha maps and texture layers alongside
  heights — texture painting operations are now fully undoable
- Bracket paint mode with beginStroke/endStroke like sculpt mode
- Fix stale static char buffer in quest objective loop (showed wrong
  objective's description when editing multiple objectives)
- Zero-initialize all quest UI text buffers for null termination safety
- Fix unused variable warnings in terrain_editor.cpp
This commit is contained in:
Kelsi 2026-05-05 12:58:11 -07:00
parent 617228559a
commit 4e2f704124
5 changed files with 44 additions and 22 deletions

View file

@ -1445,7 +1445,7 @@ void TerrainEditor::applyErode(float dt) {
if (influence <= 0.0f) continue;
float h = chunk.heightMap.heights[v];
int row = v / 17, col = v % 17;
int col = v % 17;
// Find lowest neighbor (same chunk)
float lowestH = h;
@ -1505,8 +1505,6 @@ void TerrainEditor::applyNoise(float frequency, float amplitude, int octaves, ui
for (int ci = 0; ci < 256; ci++) {
auto& chunk = terrain_->chunks[ci];
if (!chunk.hasHeightMap()) continue;
int cx = ci % 16, cy = ci / 16;
for (int v = 0; v < 145; v++) {
glm::vec3 wpos = chunkVertexWorldPos(ci, v);