BulletSim: fix problem where pre-step actions would not replaced
by new registrations thus causing multiple instances of an action.user_profiles
parent
2eda385f5e
commit
92a6958b6d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue