From cf78f3fae311be4aa4c0ab37d2a7c8b6679fb22d Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 25 Oct 2010 00:53:38 +0200 Subject: Comment repeated add and remove of avatars from the physical scene. It's no longer needed. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 38 ++++++++++++++---------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 618f425..7bf0a99 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2865,22 +2865,28 @@ namespace OpenSim.Region.Framework.Scenes { lock (m_syncRoot) { - if (m_physicsActor != null) - { - if (!IsChildAgent) - { - // This may seem like it's redundant, remove the avatar from the physics scene - // just to add it back again, but it saves us from having to update - // 3 variables 10 times a second. - bool flyingTemp = m_physicsActor.Flying; - RemoveFromPhysicalScene(); - //m_scene.PhysicsScene.RemoveAvatar(m_physicsActor); - - //PhysicsActor = null; - - AddToPhysicalScene(flyingTemp); - } - } +// MT: Commented this because it's no longer needed. +// It used to be that the avatar height was calculated from the visual +// params, so any call to this method could change the physical actor's +// height. Now the height is supplied in the agent circuit data and never +// changes here. So, we can leave physics alone. +// +// if (m_physicsActor != null) +// { +// if (!IsChildAgent) +// { +// // This may seem like it's redundant, remove the avatar from the physics scene +// // just to add it back again, but it saves us from having to update +// // 3 variables 10 times a second. +// bool flyingTemp = m_physicsActor.Flying; +// RemoveFromPhysicalScene(); +// //m_scene.PhysicsScene.RemoveAvatar(m_physicsActor); +// +// //PhysicsActor = null; +// +// AddToPhysicalScene(flyingTemp); +// } +// } #region Bake Cache Check -- cgit v1.1