mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
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:
parent
617228559a
commit
4e2f704124
5 changed files with 44 additions and 22 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue