From 92a6958b6d56293693b92c082595f46e7c9b1119 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 3 Jan 2013 19:34:14 -0800 Subject: BulletSim: fix problem where pre-step actions would not replaced by new registrations thus causing multiple instances of an action. --- OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/Physics/BulletSPlugin') 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 protected void RegisterPreStepAction(string op, uint id, BSScene.PreStepAction actn) { string identifier = op + "-" + id.ToString(); + + // Clean out any existing action + UnRegisterPreStepAction(op, id); + RegisteredActions[identifier] = actn; PhysicsScene.BeforeStep += actn; DetailLog("{0},BSPhysObject.RegisterPreStepAction,id={1}", LocalID, identifier); -- cgit v1.1