diff --git a/src/game/vmap/ModelInstance.cpp b/src/game/vmap/ModelInstance.cpp index c3116ccc6..0ea31414f 100644 --- a/src/game/vmap/ModelInstance.cpp +++ b/src/game/vmap/ModelInstance.cpp @@ -137,12 +137,14 @@ namespace VMAP // child bounds are defined in object space: Vector3 pModel = iInvRot * (p - iPos) * iInvScale; //Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f); - float zDist; - if (info.hitModel->GetLiquidLevel(pModel, zDist)) + float zLevel; + if (info.hitModel->GetLiquidLevel(pModel, zLevel)) { // calculate world height (zDist in model coords): - // assume WMO not tilted (wouldn't make much sense anyway) - liqHeight = zDist * iScale + iPos.z; + // despite making little sense, there ARE some (slightly) tilted WMOs... + // we can only determine liquid height in LOCAL z-direction (heightmap data), + // so with increasing tilt, liquid calculation gets increasingly wrong...not my fault, really :p + liqHeight = (zLevel - pModel.z) * iScale + p.z; return true; } return false; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 3bd9e1bf5..27f074441 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11077" + #define REVISION_NR "11078" #endif // __REVISION_NR_H__