Clear OdeCharacter CollisionEventUpdate when we subscribe or unsubscribe from collision events

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-10-25 22:46:42 +01:00
parent 0f83f87233
commit 6a74a4c12b
1 changed files with 2 additions and 0 deletions

View File

@ -1210,11 +1210,13 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
m_requestedUpdateFrequency = ms; m_requestedUpdateFrequency = ms;
m_eventsubscription = ms; m_eventsubscription = ms;
CollisionEventsThisFrame.Clear();
_parent_scene.AddCollisionEventReporting(this); _parent_scene.AddCollisionEventReporting(this);
} }
public override void UnSubscribeEvents() public override void UnSubscribeEvents()
{ {
CollisionEventsThisFrame.Clear();
_parent_scene.RemoveCollisionEventReporting(this); _parent_scene.RemoveCollisionEventReporting(this);
m_requestedUpdateFrequency = 0; m_requestedUpdateFrequency = 0;
m_eventsubscription = 0; m_eventsubscription = 0;