Comment repeated add and remove of avatars from the physical scene. It's no

longer needed.
avinationmerge
Melanie 2010-10-25 00:53:38 +02:00
parent dd7f9ed7bf
commit cf78f3fae3
1 changed files with 22 additions and 16 deletions

View File

@ -2865,22 +2865,28 @@ namespace OpenSim.Region.Framework.Scenes
{ {
lock (m_syncRoot) lock (m_syncRoot)
{ {
if (m_physicsActor != null) // MT: Commented this because it's no longer needed.
{ // It used to be that the avatar height was calculated from the visual
if (!IsChildAgent) // 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
// This may seem like it's redundant, remove the avatar from the physics scene // changes here. So, we can leave physics alone.
// just to add it back again, but it saves us from having to update //
// 3 variables 10 times a second. // if (m_physicsActor != null)
bool flyingTemp = m_physicsActor.Flying; // {
RemoveFromPhysicalScene(); // if (!IsChildAgent)
//m_scene.PhysicsScene.RemoveAvatar(m_physicsActor); // {
// // This may seem like it's redundant, remove the avatar from the physics scene
//PhysicsActor = null; // // just to add it back again, but it saves us from having to update
// // 3 variables 10 times a second.
AddToPhysicalScene(flyingTemp); // bool flyingTemp = m_physicsActor.Flying;
} // RemoveFromPhysicalScene();
} // //m_scene.PhysicsScene.RemoveAvatar(m_physicsActor);
//
// //PhysicsActor = null;
//
// AddToPhysicalScene(flyingTemp);
// }
// }
#region Bake Cache Check #region Bake Cache Check