From e69f246b861c824149d8b4e7cc4ff7899d5318db Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 31 Aug 2011 17:25:18 +0100 Subject: refactor: move multiple class to set avatar height into associated SP.AddToPhysicalScene() --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 2 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index f34b6d2..b6a1564 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -214,7 +214,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory changed = sp.Appearance.SetVisualParams(visualParams); if (sp.Appearance.AvatarHeight > 0) sp.SetHeight(sp.Appearance.AvatarHeight); - } + } // Process the baked texture array if (textureEntry != null) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cda2006..5e96b0a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -900,9 +900,6 @@ namespace OpenSim.Region.Framework.Scenes } AbsolutePosition = pos; - if (m_appearance.AvatarHeight > 0) - SetHeight(m_appearance.AvatarHeight); - AddToPhysicalScene(isFlying); if (m_forceFly) @@ -1036,10 +1033,6 @@ namespace OpenSim.Region.Framework.Scenes AbsolutePosition = pos; AddToPhysicalScene(isFlying); - // FIXME: Move me into AddToPhysicalScene - if (m_appearance.AvatarHeight > 0) - SetHeight(m_appearance.AvatarHeight); - SendTerseUpdateToAllClients(); } @@ -1053,9 +1046,6 @@ namespace OpenSim.Region.Framework.Scenes AbsolutePosition = pos; AddToPhysicalScene(isFlying); - if (m_appearance.AvatarHeight > 0) - SetHeight(m_appearance.AvatarHeight); - SendTerseUpdateToAllClients(); } @@ -1825,12 +1815,6 @@ namespace OpenSim.Region.Framework.Scenes m_parentID = 0; SendAvatarDataToAllAgents(); m_requestedSitTargetID = 0; - - if (m_physicsActor != null) - { - if (m_appearance.AvatarHeight > 0) - SetHeight(m_appearance.AvatarHeight); - } } Animator.TrySetMovementAnimation("STAND"); @@ -3313,6 +3297,8 @@ namespace OpenSim.Region.Framework.Scenes m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong m_physicsActor.SubscribeEvents(500); m_physicsActor.LocalID = LocalId; + + SetHeight(m_appearance.AvatarHeight); } private void OutOfBoundsCall(Vector3 pos) -- cgit v1.1