diff options
author | Melanie | 2012-10-02 23:02:53 +0100 |
---|---|---|
committer | Melanie | 2012-10-02 23:02:53 +0100 |
commit | ca5c0814f4c6e286e24e1971620aec3c0ee1c2d3 (patch) | |
tree | f630648180aca5a498cb674bfb1f967eb9bcb260 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |
parent | Attempt to fix Mantis #6311. Honor a destination folder if one is given (diff) | |
parent | correcting typo (diff) | |
download | opensim-SC-ca5c0814f4c6e286e24e1971620aec3c0ee1c2d3.zip opensim-SC-ca5c0814f4c6e286e24e1971620aec3c0ee1c2d3.tar.gz opensim-SC-ca5c0814f4c6e286e24e1971620aec3c0ee1c2d3.tar.bz2 opensim-SC-ca5c0814f4c6e286e24e1971620aec3c0ee1c2d3.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 26 |
1 files changed, 13 insertions, 13 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 | { |