mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
* Added a check for a non-finite heightfield array value passed to the ODEPlugin. This may, or may not fix anything.
This commit is contained in:
@@ -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];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user