aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 9525a11..19de1e5 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -304,17 +304,21 @@ public abstract class BSPhysObject : PhysicsActor
304 string identifier = op + "-" + id.ToString(); 304 string identifier = op + "-" + id.ToString();
305 RegisteredActions[identifier] = actn; 305 RegisteredActions[identifier] = actn;
306 PhysicsScene.BeforeStep += actn; 306 PhysicsScene.BeforeStep += actn;
307 DetailLog("{0},BSPhysObject.RegisterPreStepAction,id={1}", LocalID, identifier);
307 } 308 }
308 309
309 // Unregister a pre step action. Safe to call if the action has not been registered. 310 // Unregister a pre step action. Safe to call if the action has not been registered.
310 protected void UnRegisterPreStepAction(string op, uint id) 311 protected void UnRegisterPreStepAction(string op, uint id)
311 { 312 {
312 string identifier = op + "-" + id.ToString(); 313 string identifier = op + "-" + id.ToString();
314 bool removed = false;
313 if (RegisteredActions.ContainsKey(identifier)) 315 if (RegisteredActions.ContainsKey(identifier))
314 { 316 {
315 PhysicsScene.BeforeStep -= RegisteredActions[identifier]; 317 PhysicsScene.BeforeStep -= RegisteredActions[identifier];
316 RegisteredActions.Remove(identifier); 318 RegisteredActions.Remove(identifier);
319 removed = true;
317 } 320 }
321 DetailLog("{0},BSPhysObject.UnRegisterPreStepAction,id={1},removed={2}", LocalID, identifier, removed);
318 } 322 }
319 323
320 protected void UnRegisterAllPreStepActions() 324 protected void UnRegisterAllPreStepActions()
@@ -324,6 +328,7 @@ public abstract class BSPhysObject : PhysicsActor
324 PhysicsScene.BeforeStep -= kvp.Value; 328 PhysicsScene.BeforeStep -= kvp.Value;
325 } 329 }
326 RegisteredActions.Clear(); 330 RegisteredActions.Clear();
331 DetailLog("{0},BSPhysObject.UnRegisterAllPreStepActions,", LocalID);
327 } 332 }
328 333
329 334