In ScenePresence, when removing from the physical scene, unsubscribe

from collisions before removing the collision callbacks.
Should not make operational differences.
This commit is contained in:
Robert Adams
2015-08-23 21:13:40 -07:00
parent 722d00903b
commit 11209c72f5

View File

@@ -1398,9 +1398,9 @@ namespace OpenSim.Region.Framework.Scenes
if (PhysicsActor != null)
{
// PhysicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
PhysicsActor.UnSubscribeEvents();
PhysicsActor.OnOutOfBounds -= OutOfBoundsCall;
PhysicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
PhysicsActor.UnSubscribeEvents();
m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
PhysicsActor = null;
}