aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-17 20:34:56 +0000
committerTeravus Ovares2007-11-17 20:34:56 +0000
commit8a57dd207f3416914f0d68abe4a4cd229140ef81 (patch)
tree39d77f113bf5a0c95c2802506e699fd4206cd2f3 /OpenSim
parent* fixed goofy documentation error (diff)
downloadopensim-SC_OLD-8a57dd207f3416914f0d68abe4a4cd229140ef81.zip
opensim-SC_OLD-8a57dd207f3416914f0d68abe4a4cd229140ef81.tar.gz
opensim-SC_OLD-8a57dd207f3416914f0d68abe4a4cd229140ef81.tar.bz2
opensim-SC_OLD-8a57dd207f3416914f0d68abe4a4cd229140ef81.tar.xz
* Fixed space related SimCrasher ODE error when a prim disables itself because it's out of bounds and user moves it back into the space.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index f1c7a66..03b22ae 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -357,6 +357,20 @@ namespace OpenSim.Region.Physics.OdePlugin
357 } 357 }
358 } 358 }
359 } 359 }
360 else
361 {
362 // Everything is going slow, so we're skipping object to object collisions
363 // At least collide test against the ground.
364 foreach (OdePrim chr in _activeprims)
365 {
366 // This if may not need to be there.. it might be skipped anyway.
367 if (d.BodyIsEnabled(chr.Body))
368 {
369 d.SpaceCollide2(LandGeom, chr.prim_geom, IntPtr.Zero, nearCallback);
370
371 }
372 }
373 }
360 } 374 }
361 375
362 public override PhysicsActor AddAvatar(string avName, PhysicsVector position) 376 public override PhysicsActor AddAvatar(string avName, PhysicsVector position)
@@ -445,8 +459,16 @@ namespace OpenSim.Region.Physics.OdePlugin
445 { 459 {
446 if (d.SpaceQuery(currentspace, geom)) 460 if (d.SpaceQuery(currentspace, geom))
447 { 461 {
462
448 d.SpaceRemove(currentspace, geom); 463 d.SpaceRemove(currentspace, geom);
449 } 464 }
465 else
466 {
467 IntPtr sGeomIsIn = d.GeomGetSpace(geom);
468 if (sGeomIsIn != null)
469 d.SpaceRemove(sGeomIsIn, geom);
470 }
471
450 472
451 //If there are no more geometries in the sub-space, we don't need it in the main space anymore 473 //If there are no more geometries in the sub-space, we don't need it in the main space anymore
452 if (d.SpaceGetNumGeoms(currentspace) == 0) 474 if (d.SpaceGetNumGeoms(currentspace) == 0)
@@ -457,6 +479,21 @@ namespace OpenSim.Region.Physics.OdePlugin
457 resetSpaceArrayItemToZero(currentspace); 479 resetSpaceArrayItemToZero(currentspace);
458 } 480 }
459 } 481 }
482 else
483 {
484 // this is a physical object that got disabled. ;.;
485 if (d.SpaceQuery(currentspace, geom))
486 {
487
488 d.SpaceRemove(currentspace, geom);
489 }
490 else
491 {
492 IntPtr sGeomIsIn = d.GeomGetSpace(geom);
493 if (sGeomIsIn != null)
494 d.SpaceRemove(sGeomIsIn, geom);
495 }
496 }
460 497
461 498
462 // The routines in the Position and Size sections do the 'inserting' into the space, 499 // The routines in the Position and Size sections do the 'inserting' into the space,