diff options
author | Robert Adams | 2013-01-03 19:34:14 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-04 17:06:49 -0800 |
commit | 92a6958b6d56293693b92c082595f46e7c9b1119 (patch) | |
tree | cd3cc6fe17e9782c0efdeffa6bdd3c04b791c3f7 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |
parent | BulletSim: add ResetBroadphasePool and ResetConstraintSolver diagnostic (diff) | |
download | opensim-SC_OLD-92a6958b6d56293693b92c082595f46e7c9b1119.zip opensim-SC_OLD-92a6958b6d56293693b92c082595f46e7c9b1119.tar.gz opensim-SC_OLD-92a6958b6d56293693b92c082595f46e7c9b1119.tar.bz2 opensim-SC_OLD-92a6958b6d56293693b92c082595f46e7c9b1119.tar.xz |
BulletSim: fix problem where pre-step actions would not replaced
by new registrations thus causing multiple instances of an action.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index e7cb3e0..534f929 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -343,6 +343,10 @@ public abstract class BSPhysObject : PhysicsActor | |||
343 | protected void RegisterPreStepAction(string op, uint id, BSScene.PreStepAction actn) | 343 | protected void RegisterPreStepAction(string op, uint id, BSScene.PreStepAction actn) |
344 | { | 344 | { |
345 | string identifier = op + "-" + id.ToString(); | 345 | string identifier = op + "-" + id.ToString(); |
346 | |||
347 | // Clean out any existing action | ||
348 | UnRegisterPreStepAction(op, id); | ||
349 | |||
346 | RegisteredActions[identifier] = actn; | 350 | RegisteredActions[identifier] = actn; |
347 | PhysicsScene.BeforeStep += actn; | 351 | PhysicsScene.BeforeStep += actn; |
348 | DetailLog("{0},BSPhysObject.RegisterPreStepAction,id={1}", LocalID, identifier); | 352 | DetailLog("{0},BSPhysObject.RegisterPreStepAction,id={1}", LocalID, identifier); |