Skip to content

Commit 0b4f02c

Browse files
committed
Core/Vmaps: Don't ignore gameobject model rotation when calculating liquid level
1 parent f1c7cae commit 0b4f02c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/common/Collision/Models/GameObjectModel.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ bool GameObjectModel::GetLiquidLevel(G3D::Vector3 const& point, VMAP::LocationIn
219219
if (info.hitModel->GetLiquidLevel(pModel, zDist))
220220
{
221221
// calculate world height (zDist in model coords):
222-
// assume WMO not tilted (wouldn't make much sense anyway)
223-
liqHeight = zDist * iScale + iPos.z;
222+
liqHeight = (Vector3(pModel.x, pModel.y, zDist) * iInvRot * iScale + iPos).z;
224223
return true;
225224
}
226225
return false;

0 commit comments

Comments
 (0)