diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 13aa860..de35359 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |||
@@ -116,6 +116,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
116 | // True if initialized and ready to do simulation steps | 116 | // True if initialized and ready to do simulation steps |
117 | private bool m_initialized = false; | 117 | private bool m_initialized = false; |
118 | 118 | ||
119 | // Flag which is true when processing taints. | ||
120 | // Not guaranteed to be correct all the time (don't depend on this) but good for debugging. | ||
121 | public bool InTaintTime { get; private set; } | ||
122 | |||
119 | // Pinned memory used to pass step information between managed and unmanaged | 123 | // Pinned memory used to pass step information between managed and unmanaged |
120 | private int m_maxCollisionsPerFrame; | 124 | private int m_maxCollisionsPerFrame; |
121 | private CollisionDesc[] m_collisionArray; | 125 | private CollisionDesc[] m_collisionArray; |
@@ -270,6 +274,9 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
270 | TerrainManager = new BSTerrainManager(this); | 274 | TerrainManager = new BSTerrainManager(this); |
271 | TerrainManager.CreateInitialGroundPlaneAndTerrain(); | 275 | TerrainManager.CreateInitialGroundPlaneAndTerrain(); |
272 | 276 | ||
277 | m_log.WarnFormat("{0} Linksets implemented with {1}", LogHeader, (BSLinkset.LinksetImplementation)Params.linksetImplementation); | ||
278 | |||
279 | InTaintTime = false; | ||
273 | m_initialized = true; | 280 | m_initialized = true; |
274 | } | 281 | } |
275 | 282 | ||
@@ -707,8 +714,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
707 | // here just before the physics engine is called to step the simulation. | 714 | // here just before the physics engine is called to step the simulation. |
708 | public void ProcessTaints() | 715 | public void ProcessTaints() |
709 | { | 716 | { |
717 | InTaintTime = true; | ||
710 | ProcessRegularTaints(); | 718 | ProcessRegularTaints(); |
711 | ProcessPostTaintTaints(); | 719 | ProcessPostTaintTaints(); |
720 | InTaintTime = false; | ||
712 | } | 721 | } |
713 | 722 | ||
714 | private void ProcessRegularTaints() | 723 | private void ProcessRegularTaints() |
@@ -851,6 +860,17 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
851 | } | 860 | } |
852 | } | 861 | } |
853 | 862 | ||
863 | public bool AssertInTaintTime(string whereFrom) | ||
864 | { | ||
865 | if (!InTaintTime) | ||
866 | { | ||
867 | DetailLog("{0},BSScene.AssertInTaintTime,NOT IN TAINT TIME,Region={1},Where={2}", DetailLogZero, RegionName, whereFrom); | ||
868 | m_log.ErrorFormat("{0} NOT IN TAINT TIME!! Region={1}, Where={2}", LogHeader, RegionName, whereFrom); | ||
869 | Util.PrintCallStack(); | ||
870 | } | ||
871 | return InTaintTime; | ||
872 | } | ||
873 | |||
854 | #endregion // Taints | 874 | #endregion // Taints |
855 | 875 | ||
856 | #region Vehicles | 876 | #region Vehicles |
@@ -1214,8 +1234,8 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
1214 | (s) => { return s.m_params[0].numberOfSolverIterations; }, | 1234 | (s) => { return s.m_params[0].numberOfSolverIterations; }, |
1215 | (s,p,l,v) => { s.m_params[0].numberOfSolverIterations = v; } ), | 1235 | (s,p,l,v) => { s.m_params[0].numberOfSolverIterations = v; } ), |
1216 | 1236 | ||
1217 | new ParameterDefn("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound)", | 1237 | new ParameterDefn("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound, 2=Manual)", |
1218 | (float)BSLinkset.LinksetImplementation.Constraint, | 1238 | (float)BSLinkset.LinksetImplementation.Compound, |
1219 | (s,cf,p,v) => { s.m_params[0].linksetImplementation = cf.GetFloat(p,v); }, | 1239 | (s,cf,p,v) => { s.m_params[0].linksetImplementation = cf.GetFloat(p,v); }, |
1220 | (s) => { return s.m_params[0].linksetImplementation; }, | 1240 | (s) => { return s.m_params[0].linksetImplementation; }, |
1221 | (s,p,l,v) => { s.m_params[0].linksetImplementation = v; } ), | 1241 | (s,p,l,v) => { s.m_params[0].linksetImplementation = v; } ), |