Core/Vmaps: Made code more safe and fixed problems in WmoLiquid::GetLiquidHeight()

This commit is contained in:
Lynx3d & Ambal
2011-04-02 20:36:27 +02:00
committed by Shauren
parent a54713ec4b
commit 347098af14
3 changed files with 7 additions and 5 deletions
@@ -128,7 +128,7 @@ class BIH
for (int i=0; i<3; ++i)
{
invDir[i] = 1.f / dir[i];
if (dir[i] != 0.f)
if (G3D::fuzzyNe(dir[i], 0.0f))
{
float t1 = (bounds.low()[i] - org[i]) * invDir[i];
float t2 = (bounds.high()[i] - org[i]) * invDir[i];