aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorTeravus Ovares2008-06-04 16:27:35 +0000
committerTeravus Ovares2008-06-04 16:27:35 +0000
commit11246c284fa1fb2def5dd5cd9804c353a2bee0ab (patch)
tree287e3626a66cd71502d8053305ed76c282bbe005 /OpenSim/Region/Physics
parentMantis#1447. Thank you kindly, Kinoc for a patch that: (diff)
downloadopensim-SC_OLD-11246c284fa1fb2def5dd5cd9804c353a2bee0ab.zip
opensim-SC_OLD-11246c284fa1fb2def5dd5cd9804c353a2bee0ab.tar.gz
opensim-SC_OLD-11246c284fa1fb2def5dd5cd9804c353a2bee0ab.tar.bz2
opensim-SC_OLD-11246c284fa1fb2def5dd5cd9804c353a2bee0ab.tar.xz
* Added a check for a non-finite heightfield array value passed to the ODEPlugin. This may, or may not fix anything.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 5078f03..787cb12 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -2025,8 +2025,17 @@ namespace OpenSim.Region.Physics.OdePlugin
2025 { 2025 {
2026 for (int x = 0; x < 512; x++) 2026 for (int x = 0; x < 512; x++)
2027 { 2027 {
2028 if (Single.IsNaN(resultarr2[y, x]) || Single.IsInfinity(resultarr2[y, x]))
2029 {
2030 m_log.Warn("[PHYSICS]: Non finite heightfield element detected. Setting it to 0");
2031 resultarr2[y, x] = 0;
2032 }
2033
2028 if (resultarr2[y, x] <= 0) 2034 if (resultarr2[y, x] <= 0)
2035 {
2029 returnarr[i] = 0.0000001f; 2036 returnarr[i] = 0.0000001f;
2037
2038 }
2030 else 2039 else
2031 returnarr[i] = resultarr2[y, x]; 2040 returnarr[i] = resultarr2[y, x];
2032 2041