aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs26
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs2
2 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 0cf8c91..aaed7de 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -493,6 +493,10 @@ public class BSScene : PhysicsScene, IPhysicsParameters
493 // step the physical world one interval 493 // step the physical world one interval
494 m_simulationStep++; 494 m_simulationStep++;
495 int numSubSteps = 0; 495 int numSubSteps = 0;
496
497 // Sometimes needed for debugging to find out what happened before the step
498 // PhysicsLogging.Flush();
499
496 try 500 try
497 { 501 {
498 if (PhysicsLogging.Enabled) beforeTime = Util.EnvironmentTickCount(); 502 if (PhysicsLogging.Enabled) beforeTime = Util.EnvironmentTickCount();
@@ -536,7 +540,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters
536 } 540 }
537 541
538 // This is a kludge to get avatar movement updates. 542 // This is a kludge to get avatar movement updates.
539 // ODE sends collisions for avatars even if there are have been no collisions. This updates 543 // the simulator expects collisions for avatars even if there are have been no collisions. This updates
540 // avatar animations and stuff. 544 // avatar animations and stuff.
541 // If you fix avatar animation updates, remove this overhead and let normal collision processing happen. 545 // If you fix avatar animation updates, remove this overhead and let normal collision processing happen.
542 foreach (BSPhysObject bsp in m_avatars) 546 foreach (BSPhysObject bsp in m_avatars)
@@ -556,7 +560,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters
556 } 560 }
557 561
558 // Objects that are done colliding are removed from the ObjectsWithCollisions list. 562 // Objects that are done colliding are removed from the ObjectsWithCollisions list.
559 // This can't be done by SendCollisions because it is inside an iteration of ObjectWithCollisions. 563 // Not done above because it is inside an iteration of ObjectWithCollisions.
560 if (ObjectsWithNoMoreCollisions.Count > 0) 564 if (ObjectsWithNoMoreCollisions.Count > 0)
561 { 565 {
562 foreach (BSPhysObject po in ObjectsWithNoMoreCollisions) 566 foreach (BSPhysObject po in ObjectsWithNoMoreCollisions)
@@ -726,13 +730,10 @@ public class BSScene : PhysicsScene, IPhysicsParameters
726 730
727 public void VehicleInSceneTypeChanged(BSPrim vehic, Vehicle newType) 731 public void VehicleInSceneTypeChanged(BSPrim vehic, Vehicle newType)
728 { 732 {
729 if (newType == Vehicle.TYPE_NONE) 733 RemoveVehiclePrim(vehic);
730 { 734 if (newType != Vehicle.TYPE_NONE)
731 RemoveVehiclePrim(vehic);
732 }
733 else
734 { 735 {
735 // make it so the scene will call us each tick to do vehicle things 736 // make it so the scene will call us each tick to do vehicle things
736 AddVehiclePrim(vehic); 737 AddVehiclePrim(vehic);
737 } 738 }
738 } 739 }
@@ -764,7 +765,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters
764 } 765 }
765 766
766 // Some prims have extra vehicle actions 767 // Some prims have extra vehicle actions
767 // no locking because only called when physics engine is not busy 768 // Called at taint time!
768 private void ProcessVehicles(float timeStep) 769 private void ProcessVehicles(float timeStep)
769 { 770 {
770 foreach (BSPhysObject pobj in m_vehicles) 771 foreach (BSPhysObject pobj in m_vehicles)
@@ -1008,12 +1009,12 @@ public class BSScene : PhysicsScene, IPhysicsParameters
1008 1009
1009 1010
1010 new ParameterDefn("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)", 1011 new ParameterDefn("MaxPersistantManifoldPoolSize", "Number of manifolds pooled (0 means default of 4096)",
1011 0f, // zero to disable 1012 0f,
1012 (s,cf,p,v) => { s.m_params[0].maxPersistantManifoldPoolSize = cf.GetFloat(p, v); }, 1013 (s,cf,p,v) => { s.m_params[0].maxPersistantManifoldPoolSize = cf.GetFloat(p, v); },
1013 (s) => { return s.m_params[0].maxPersistantManifoldPoolSize; }, 1014 (s) => { return s.m_params[0].maxPersistantManifoldPoolSize; },
1014 (s,p,l,v) => { s.m_params[0].maxPersistantManifoldPoolSize = v; } ), 1015 (s,p,l,v) => { s.m_params[0].maxPersistantManifoldPoolSize = v; } ),
1015 new ParameterDefn("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)", 1016 new ParameterDefn("MaxCollisionAlgorithmPoolSize", "Number of collisions pooled (0 means default of 4096)",
1016 0f, // zero to disable 1017 0f,
1017 (s,cf,p,v) => { s.m_params[0].maxCollisionAlgorithmPoolSize = cf.GetFloat(p, v); }, 1018 (s,cf,p,v) => { s.m_params[0].maxCollisionAlgorithmPoolSize = cf.GetFloat(p, v); },
1018 (s) => { return s.m_params[0].maxCollisionAlgorithmPoolSize; }, 1019 (s) => { return s.m_params[0].maxCollisionAlgorithmPoolSize; },
1019 (s,p,l,v) => { s.m_params[0].maxCollisionAlgorithmPoolSize = v; } ), 1020 (s,p,l,v) => { s.m_params[0].maxCollisionAlgorithmPoolSize = v; } ),
@@ -1028,7 +1029,7 @@ public class BSScene : PhysicsScene, IPhysicsParameters
1028 (s) => { return s.m_params[0].shouldForceUpdateAllAabbs; }, 1029 (s) => { return s.m_params[0].shouldForceUpdateAllAabbs; },
1029 (s,p,l,v) => { s.m_params[0].shouldForceUpdateAllAabbs = v; } ), 1030 (s,p,l,v) => { s.m_params[0].shouldForceUpdateAllAabbs = v; } ),
1030 new ParameterDefn("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction", 1031 new ParameterDefn("ShouldRandomizeSolverOrder", "Enable for slightly better stacking interaction",
1031 ConfigurationParameters.numericFalse, 1032 ConfigurationParameters.numericTrue,
1032 (s,cf,p,v) => { s.m_params[0].shouldRandomizeSolverOrder = s.NumericBool(cf.GetBoolean(p, s.BoolNumeric(v))); }, 1033 (s,cf,p,v) => { s.m_params[0].shouldRandomizeSolverOrder = s.NumericBool(cf.GetBoolean(p, s.BoolNumeric(v))); },
1033 (s) => { return s.m_params[0].shouldRandomizeSolverOrder; }, 1034 (s) => { return s.m_params[0].shouldRandomizeSolverOrder; },
1034 (s,p,l,v) => { s.m_params[0].shouldRandomizeSolverOrder = v; } ), 1035 (s,p,l,v) => { s.m_params[0].shouldRandomizeSolverOrder = v; } ),
@@ -1152,7 +1153,6 @@ public class BSScene : PhysicsScene, IPhysicsParameters
1152 { 1153 {
1153 if (SettableParameters.Length < ParameterDefinitions.Length) 1154 if (SettableParameters.Length < ParameterDefinitions.Length)
1154 { 1155 {
1155
1156 List<PhysParameterEntry> entries = new List<PhysParameterEntry>(); 1156 List<PhysParameterEntry> entries = new List<PhysParameterEntry>();
1157 for (int ii = 0; ii < ParameterDefinitions.Length; ii++) 1157 for (int ii = 0; ii < ParameterDefinitions.Length; ii++)
1158 { 1158 {
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index d49e5f3..a43880d 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -71,7 +71,7 @@ public struct BulletBody
71 buff.Append(ID.ToString()); 71 buff.Append(ID.ToString());
72 buff.Append(",p="); 72 buff.Append(",p=");
73 buff.Append(ptr.ToString("X")); 73 buff.Append(ptr.ToString("X"));
74 if (collisionFilter != 0 && collisionMask != 0) 74 if (collisionFilter != 0 || collisionMask != 0)
75 { 75 {
76 buff.Append(",f="); 76 buff.Append(",f=");
77 buff.Append(collisionFilter.ToString("X")); 77 buff.Append(collisionFilter.ToString("X"));