aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index 5e70a23..17cc7b4 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -96,6 +96,9 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
96 public long SimulationStep { get { return m_simulationStep; } } 96 public long SimulationStep { get { return m_simulationStep; } }
97 private int m_taintsToProcessPerStep; 97 private int m_taintsToProcessPerStep;
98 98
99 public delegate void PreStepAction(float timeStep);
100 public event PreStepAction BeforeStep;
101
99 // A value of the time now so all the collision and update routines do not have to get their own 102 // A value of the time now so all the collision and update routines do not have to get their own
100 // Set to 'now' just before all the prims and actors are called for collisions and updates 103 // Set to 'now' just before all the prims and actors are called for collisions and updates
101 public int SimulationNowTime { get; private set; } 104 public int SimulationNowTime { get; private set; }
@@ -487,8 +490,10 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
487 ProcessTaints(); 490 ProcessTaints();
488 491
489 // Some of the prims operate with special vehicle properties 492 // Some of the prims operate with special vehicle properties
490 ProcessVehicles(timeStep); 493 DoPreStepActions(timeStep);
491 ProcessTaints(); // the vehicles might have added taints 494
495 // the prestep actions might have added taints
496 ProcessTaints();
492 497
493 // step the physical world one interval 498 // step the physical world one interval
494 m_simulationStep++; 499 m_simulationStep++;
@@ -907,6 +912,16 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
907 } 912 }
908 } 913 }
909 914
915 private void DoPreStepActions(float timeStep)
916 {
917 ProcessVehicles(timeStep);
918
919 PreStepAction actions = BeforeStep;
920 if (actions != null)
921 actions(timeStep);
922
923 }
924
910 // Some prims have extra vehicle actions 925 // Some prims have extra vehicle actions
911 // Called at taint time! 926 // Called at taint time!
912 private void ProcessVehicles(float timeStep) 927 private void ProcessVehicles(float timeStep)