* Added a check for a non-finite heightfield array value passed to the ODEPlugin. This may, or may not fix anything.

0.6.0-stable
Teravus Ovares 2008-06-04 16:27:35 +00:00
parent 994932bb60
commit 11246c284f
1 changed files with 9 additions and 0 deletions

View File

@ -2025,8 +2025,17 @@ namespace OpenSim.Region.Physics.OdePlugin
{
for (int x = 0; x < 512; x++)
{
if (Single.IsNaN(resultarr2[y, x]) || Single.IsInfinity(resultarr2[y, x]))
{
m_log.Warn("[PHYSICS]: Non finite heightfield element detected. Setting it to 0");
resultarr2[y, x] = 0;
}
if (resultarr2[y, x] <= 0)
{
returnarr[i] = 0.0000001f;
}
else
returnarr[i] = resultarr2[y, x];