From 7c8cc345cd6cb50875857a55e897f7ff61b7fd8b Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 16 Aug 2008 20:54:51 +0000 Subject: * re-order an operation to check for NaNs in the maptile shadow routine. --- OpenSim/Region/Environment/Scenes/Scene.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 568416c..f5117b9 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1115,15 +1115,15 @@ namespace OpenSim.Region.Environment.Scenes { hfvalue = (float)hm[x, y]; hfvaluecompare = (float)hm[x - 1, y - 1]; - hfdiff = hfvaluecompare - hfvalue; - - + if (Single.IsInfinity(hfvalue) || Single.IsNaN(hfvalue)) hfvalue = 0; if (Single.IsInfinity(hfvaluecompare) || Single.IsNaN(hfvaluecompare)) hfvaluecompare = 0; - + + hfdiff = hfvaluecompare - hfvalue; + if (hfdiff > 0.3f) { -- cgit v1.1