From bf6206b2b8c54eceaafeb246eb8115bb98b936d2 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 9 Feb 2026 22:46:07 -0800 Subject: [PATCH] Add terrain water fix for Northshire Abbey fountain Also handle terrain water (MH2O) not just WMO water. Lower terrain water by 2 units within 300 units of fountain center at (-9048, -44, 93.7). --- src/rendering/water_renderer.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/rendering/water_renderer.cpp b/src/rendering/water_renderer.cpp index 7c7ca515..451bc6b4 100644 --- a/src/rendering/water_renderer.cpp +++ b/src/rendering/water_renderer.cpp @@ -284,6 +284,25 @@ void WaterRenderer::loadFromTerrain(const pipeline::ADTTerrain& terrain, bool ap } } + // Fix Northshire Abbey fountain terrain water + // Fountain at approximately (-9048, -44, 93.7) + float tileWorldX = (32.0f - tileX) * 533.33333f; + float tileWorldY = (32.0f - tileY) * 533.33333f; + glm::vec3 northshireFountainPos(-9048.0f, -44.2f, 93.7f); + float distToFountain = glm::distance(glm::vec2(tileWorldX, tileWorldY), + glm::vec2(northshireFountainPos.x, northshireFountainPos.y)); + + // Lower fountain water by 2 units if within same tile/nearby + if (distToFountain < 300.0f && std::abs(layer.minHeight - northshireFountainPos.z) < 10.0f) { + LOG_INFO(" -> LOWERING Northshire fountain terrain water at tile (", tileX, ",", tileY, + ") by 2 units (dist: ", distToFountain, ")"); + for (float& h : surface.heights) { + h -= 2.0f; + } + surface.minHeight -= 2.0f; + surface.maxHeight -= 2.0f; + } + // Copy render mask surface.mask = layer.mask;