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() --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/Framework') 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