diff options
author | Jelle Meeus <sogladev@gmail.com> | 2024-12-01 21:09:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-01 17:09:47 -0300 |
commit | 2d616ce0e84dbead46460d32670862ac0ad1461d (patch) | |
tree | b7e660095d3d92d3aed3724268d150a9d6400cb4 /src/common | |
parent | cf7959238ad3a375a3549f4087ee18a35df0776b (diff) |
fix(Core/Vmaps): Do not ignore model rotation when calculating liquid level (#20760)
cherry-picked from:
https://github.com/TrinityCore/TrinityCore/commit/53b4501ce9b072cfffe7de7f348094f443e36950
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/Collision/Models/ModelInstance.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/Collision/Models/ModelInstance.cpp b/src/common/Collision/Models/ModelInstance.cpp index 4a540a7857..a18d5d4f9f 100644 --- a/src/common/Collision/Models/ModelInstance.cpp +++ b/src/common/Collision/Models/ModelInstance.cpp @@ -150,8 +150,7 @@ namespace VMAP if (info.hitModel->GetLiquidLevel(pModel, zDist)) { // calculate world height (zDist in model coords): - // assume WMO not tilted (wouldn't make much sense anyway) - liqHeight = zDist * iScale + iPos.z; + liqHeight = (Vector3(pModel.x, pModel.y, zDist) * iInvRot * iScale + iPos).z; return true; } return false; |