mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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).
This commit is contained in:
parent
b1df5d673b
commit
bf6206b2b8
1 changed files with 19 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue