diff options
author | UbitUmarov | 2015-11-21 02:14:19 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-21 02:14:19 +0000 |
commit | 0b36d4ea2f5977c5e1e7f0e3fcf890a66ff89348 (patch) | |
tree | c2aaf4d741063f02bf20a80b8a7465ec8d84548d /OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs | |
parent | remove a warning (diff) | |
download | opensim-SC-0b36d4ea2f5977c5e1e7f0e3fcf890a66ff89348.zip opensim-SC-0b36d4ea2f5977c5e1e7f0e3fcf890a66ff89348.tar.gz opensim-SC-0b36d4ea2f5977c5e1e7f0e3fcf890a66ff89348.tar.bz2 opensim-SC-0b36d4ea2f5977c5e1e7f0e3fcf890a66ff89348.tar.xz |
some cleanup, allow cast rays to collide with terrain within limited range (old ode)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs | 73 |
1 files changed, 6 insertions, 67 deletions
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs index e39b8c7..a21ec2b 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs | |||
@@ -175,8 +175,8 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
175 | // this value may still be too large, depending on machine configuration | 175 | // this value may still be too large, depending on machine configuration |
176 | // of maximum stack | 176 | // of maximum stack |
177 | float len = req.length; | 177 | float len = req.length; |
178 | if (len > 250f) | 178 | if (len > 100f) |
179 | len = 250f; | 179 | len = 100f; |
180 | 180 | ||
181 | // Create the ray | 181 | // Create the ray |
182 | IntPtr ray = d.CreateRay(m_scene.space, len); | 182 | IntPtr ray = d.CreateRay(m_scene.space, len); |
@@ -226,8 +226,8 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
226 | { | 226 | { |
227 | // limit ray length or collisions will take all avaiable stack space | 227 | // limit ray length or collisions will take all avaiable stack space |
228 | float len = req.length; | 228 | float len = req.length; |
229 | if (len > 250f) | 229 | if (len > 100f) |
230 | len = 250f; | 230 | len = 100f; |
231 | 231 | ||
232 | // Create the ray | 232 | // Create the ray |
233 | IntPtr ray = d.CreateRay(m_scene.space, len); | 233 | IntPtr ray = d.CreateRay(m_scene.space, len); |
@@ -252,71 +252,10 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
252 | private void near(IntPtr space, IntPtr g1, IntPtr g2) | 252 | private void near(IntPtr space, IntPtr g1, IntPtr g2) |
253 | { | 253 | { |
254 | 254 | ||
255 | //Don't test against heightfield Geom, or you'll be sorry! | ||
256 | |||
257 | /* | ||
258 | terminate called after throwing an instance of 'std::bad_alloc' | ||
259 | what(): std::bad_alloc | ||
260 | Stacktrace: | ||
261 | |||
262 | at (wrapper managed-to-native) Ode.NET.d.Collide (intptr,intptr,int,Ode.NET.d/ContactGeom[],int) <0x00004> | ||
263 | at (wrapper managed-to-native) Ode.NET.d.Collide (intptr,intptr,int,Ode.NET.d/ContactGeom[],int) <0xffffffff> | ||
264 | at OpenSim.Region.Physics.OdePlugin.ODERayCastRequestManager.near (intptr,intptr,intptr) <0x00280> | ||
265 | at (wrapper native-to-managed) OpenSim.Region.Physics.OdePlugin.ODERayCastRequestManager.near (intptr,intptr,intptr) <0xfff | ||
266 | fffff> | ||
267 | at (wrapper managed-to-native) Ode.NET.d.SpaceCollide2 (intptr,intptr,intptr,Ode.NET.d/NearCallback) <0x00004> | ||
268 | at (wrapper managed-to-native) Ode.NET.d.SpaceCollide2 (intptr,intptr,intptr,Ode.NET.d/NearCallback) <0xffffffff> | ||
269 | at OpenSim.Region.Physics.OdePlugin.ODERayCastRequestManager.RayCast (OpenSim.Region.Physics.OdePlugin.ODERayCastRequest) < | ||
270 | 0x00114> | ||
271 | at OpenSim.Region.Physics.OdePlugin.ODERayCastRequestManager.ProcessQueuedRequests () <0x000eb> | ||
272 | at OpenSim.Region.Physics.OdePlugin.OdeScene.Simulate (single) <0x017e6> | ||
273 | at OpenSim.Region.Framework.Scenes.SceneGraph.UpdatePhysics (double) <0x00042> | ||
274 | at OpenSim.Region.Framework.Scenes.Scene.Update () <0x0039e> | ||
275 | at OpenSim.Region.Framework.Scenes.Scene.Heartbeat (object) <0x00019> | ||
276 | at (wrapper runtime-invoke) object.runtime_invoke_void__this___object (object,intptr,intptr,intptr) <0xffffffff> | ||
277 | |||
278 | Native stacktrace: | ||
279 | |||
280 | mono [0x80d2a42] | ||
281 | [0xb7f5840c] | ||
282 | /lib/i686/cmov/libc.so.6(abort+0x188) [0xb7d1a018] | ||
283 | /usr/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x158) [0xb45fc988] | ||
284 | /usr/lib/libstdc++.so.6 [0xb45fa865] | ||
285 | /usr/lib/libstdc++.so.6 [0xb45fa8a2] | ||
286 | /usr/lib/libstdc++.so.6 [0xb45fa9da] | ||
287 | /usr/lib/libstdc++.so.6(_Znwj+0x83) [0xb45fb033] | ||
288 | /usr/lib/libstdc++.so.6(_Znaj+0x1d) [0xb45fb11d] | ||
289 | libode.so(_ZN13dxHeightfield23dCollideHeightfieldZoneEiiiiP6dxGeomiiP12dContactGeomi+0xd04) [0xb46678e4] | ||
290 | libode.so(_Z19dCollideHeightfieldP6dxGeomS0_iP12dContactGeomi+0x54b) [0xb466832b] | ||
291 | libode.so(dCollide+0x102) [0xb46571b2] | ||
292 | [0x95cfdec9] | ||
293 | [0x8ea07fe1] | ||
294 | [0xab260146] | ||
295 | libode.so [0xb465a5c4] | ||
296 | libode.so(_ZN11dxHashSpace8collide2EPvP6dxGeomPFvS0_S2_S2_E+0x75) [0xb465bcf5] | ||
297 | libode.so(dSpaceCollide2+0x177) [0xb465ac67] | ||
298 | [0x95cf978e] | ||
299 | [0x8ea07945] | ||
300 | [0x95cf2bbc] | ||
301 | [0xab2787e7] | ||
302 | [0xab419fb3] | ||
303 | [0xab416657] | ||
304 | [0xab415bda] | ||
305 | [0xb609b08e] | ||
306 | mono(mono_runtime_delegate_invoke+0x34) [0x8192534] | ||
307 | mono [0x81a2f0f] | ||
308 | mono [0x81d28b6] | ||
309 | mono [0x81ea2c6] | ||
310 | /lib/i686/cmov/libpthread.so.0 [0xb7e744c0] | ||
311 | /lib/i686/cmov/libc.so.6(clone+0x5e) [0xb7dcd6de] | ||
312 | */ | ||
313 | |||
314 | // Exclude heightfield geom | ||
315 | |||
316 | if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) | 255 | if (g1 == IntPtr.Zero || g2 == IntPtr.Zero) |
317 | return; | 256 | return; |
318 | if (d.GeomGetClass(g1) == d.GeomClassID.HeightfieldClass || d.GeomGetClass(g2) == d.GeomClassID.HeightfieldClass) | 257 | // if (d.GeomGetClass(g1) == d.GeomClassID.HeightfieldClass || d.GeomGetClass(g2) == d.GeomClassID.HeightfieldClass) |
319 | return; | 258 | // return; |
320 | 259 | ||
321 | // Raytest against AABBs of spaces first, then dig into the spaces it hits for actual geoms. | 260 | // Raytest against AABBs of spaces first, then dig into the spaces it hits for actual geoms. |
322 | if (d.GeomIsSpace(g1) || d.GeomIsSpace(g2)) | 261 | if (d.GeomIsSpace(g1) || d.GeomIsSpace(g2)) |