aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
authorMelanie2012-12-18 09:44:10 +0000
committerMelanie2012-12-18 09:44:10 +0000
commitb9939a46a19af74f79a492e3b9fb3f65d0de31cd (patch)
treeb20ee4582458689096ff58770397c766c4ac36a8 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
parentMerge branch 'master' into careminster (diff)
parentBulletSim: fix vehicles being shot in the air at border crossings because of ... (diff)
downloadopensim-SC-b9939a46a19af74f79a492e3b9fb3f65d0de31cd.zip
opensim-SC-b9939a46a19af74f79a492e3b9fb3f65d0de31cd.tar.gz
opensim-SC-b9939a46a19af74f79a492e3b9fb3f65d0de31cd.tar.bz2
opensim-SC-b9939a46a19af74f79a492e3b9fb3f65d0de31cd.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs19
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index cf5bb57..7b44574 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -349,8 +349,6 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
349 // make sure no stepping happens while we're deleting stuff 349 // make sure no stepping happens while we're deleting stuff
350 m_initialized = false; 350 m_initialized = false;
351 351
352 TerrainManager.ReleaseGroundPlaneAndTerrain();
353
354 foreach (KeyValuePair<uint, BSPhysObject> kvp in PhysObjects) 352 foreach (KeyValuePair<uint, BSPhysObject> kvp in PhysObjects)
355 { 353 {
356 kvp.Value.Destroy(); 354 kvp.Value.Destroy();
@@ -370,6 +368,13 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
370 Shapes = null; 368 Shapes = null;
371 } 369 }
372 370
371 if (TerrainManager != null)
372 {
373 TerrainManager.ReleaseGroundPlaneAndTerrain();
374 TerrainManager.Dispose();
375 TerrainManager = null;
376 }
377
373 // Anything left in the unmanaged code should be cleaned out 378 // Anything left in the unmanaged code should be cleaned out
374 BulletSimAPI.Shutdown2(World.ptr); 379 BulletSimAPI.Shutdown2(World.ptr);
375 380
@@ -512,8 +517,9 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
512 out updatedEntityCount, out updatedEntitiesPtr, out collidersCount, out collidersPtr); 517 out updatedEntityCount, out updatedEntitiesPtr, out collidersCount, out collidersPtr);
513 518
514 if (PhysicsLogging.Enabled) simTime = Util.EnvironmentTickCountSubtract(beforeTime); 519 if (PhysicsLogging.Enabled) simTime = Util.EnvironmentTickCountSubtract(beforeTime);
515 DetailLog("{0},Simulate,call, frame={1}, nTaints={2}, simTime={3}, substeps={4}, updates={5}, colliders={6}", 520 DetailLog("{0},Simulate,call, frame={1}, nTaints={2}, simTime={3}, substeps={4}, updates={5}, colliders={6}, objWColl={7}",
516 DetailLogZero, m_simulationStep, numTaints, simTime, numSubSteps, updatedEntityCount, collidersCount); 521 DetailLogZero, m_simulationStep, numTaints, simTime, numSubSteps,
522 updatedEntityCount, collidersCount, ObjectsWithCollisions.Count);
517 if (VehiclePhysicalLoggingEnabled) DumpVehicles(); // DEBUG 523 if (VehiclePhysicalLoggingEnabled) DumpVehicles(); // DEBUG
518 } 524 }
519 catch (Exception e) 525 catch (Exception e)
@@ -568,6 +574,9 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
568 574
569 // Objects that are done colliding are removed from the ObjectsWithCollisions list. 575 // Objects that are done colliding are removed from the ObjectsWithCollisions list.
570 // Not done above because it is inside an iteration of ObjectWithCollisions. 576 // Not done above because it is inside an iteration of ObjectWithCollisions.
577 // This complex collision processing is required to create an empty collision
578 // event call after all collisions have happened on an object. This enables
579 // the simulator to generate the 'collision end' event.
571 if (ObjectsWithNoMoreCollisions.Count > 0) 580 if (ObjectsWithNoMoreCollisions.Count > 0)
572 { 581 {
573 foreach (BSPhysObject po in ObjectsWithNoMoreCollisions) 582 foreach (BSPhysObject po in ObjectsWithNoMoreCollisions)
@@ -592,7 +601,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
592 601
593 ProcessPostStepTaints(); 602 ProcessPostStepTaints();
594 603
595 // This causes the unmanaged code to output ALL the values found in ALL the objects in the world. 604 // The following causes the unmanaged code to output ALL the values found in ALL the objects in the world.
596 // Only enable this in a limited test world with few objects. 605 // Only enable this in a limited test world with few objects.
597 // BulletSimAPI.DumpAllInfo2(World.ptr); // DEBUG DEBUG DEBUG 606 // BulletSimAPI.DumpAllInfo2(World.ptr); // DEBUG DEBUG DEBUG
598 607