From 13b1c5dfcef6e6e74709da8d588ed48d99d560d2 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 5 Sep 2015 17:50:55 +0100 Subject: let ode suport var size regions Signed-off-by: Diva Canto --- OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs') 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 /// private void RayCast(ODERayCastRequest req) { + // UBIT: limit ray lenght or collisions will take all avaiable stack space + // this value may still be too large, depending on machine configuration + // of maximum stack + float len = req.length; + if (len > 250f) + len = 250f; + // Create the ray IntPtr ray = d.CreateRay(m_scene.space, req.length); d.GeomRaySet(ray, req.Origin.X, req.Origin.Y, req.Origin.Z, req.Normal.X, req.Normal.Y, req.Normal.Z); -- cgit v1.1