aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
index 21bfea3..aafc7c6 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
@@ -172,6 +172,13 @@ namespace OpenSim.Region.PhysicsModule.ODE
172 /// <param name="req"></param> 172 /// <param name="req"></param>
173 private void RayCast(ODERayCastRequest req) 173 private void RayCast(ODERayCastRequest req)
174 { 174 {
175 // UBIT: limit ray lenght or collisions will take all avaiable stack space
176 // this value may still be too large, depending on machine configuration
177 // of maximum stack
178 float len = req.length;
179 if (len > 250f)
180 len = 250f;
181
175 // Create the ray 182 // Create the ray
176 IntPtr ray = d.CreateRay(m_scene.space, req.length); 183 IntPtr ray = d.CreateRay(m_scene.space, req.length);
177 d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); 184 d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z);