refactor: move multiple class to set avatar height into associated SP.AddToPhysicalScene()

remove-scene-viewer
Justin Clark-Casey (justincc) 2011-08-31 17:25:18 +01:00
parent 899d109e82
commit e69f246b86
2 changed files with 3 additions and 17 deletions

View File

@ -214,7 +214,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
changed = sp.Appearance.SetVisualParams(visualParams); changed = sp.Appearance.SetVisualParams(visualParams);
if (sp.Appearance.AvatarHeight > 0) if (sp.Appearance.AvatarHeight > 0)
sp.SetHeight(sp.Appearance.AvatarHeight); sp.SetHeight(sp.Appearance.AvatarHeight);
} }
// Process the baked texture array // Process the baked texture array
if (textureEntry != null) if (textureEntry != null)

View File

@ -900,9 +900,6 @@ namespace OpenSim.Region.Framework.Scenes
} }
AbsolutePosition = pos; AbsolutePosition = pos;
if (m_appearance.AvatarHeight > 0)
SetHeight(m_appearance.AvatarHeight);
AddToPhysicalScene(isFlying); AddToPhysicalScene(isFlying);
if (m_forceFly) if (m_forceFly)
@ -1036,10 +1033,6 @@ namespace OpenSim.Region.Framework.Scenes
AbsolutePosition = pos; AbsolutePosition = pos;
AddToPhysicalScene(isFlying); AddToPhysicalScene(isFlying);
// FIXME: Move me into AddToPhysicalScene
if (m_appearance.AvatarHeight > 0)
SetHeight(m_appearance.AvatarHeight);
SendTerseUpdateToAllClients(); SendTerseUpdateToAllClients();
} }
@ -1053,9 +1046,6 @@ namespace OpenSim.Region.Framework.Scenes
AbsolutePosition = pos; AbsolutePosition = pos;
AddToPhysicalScene(isFlying); AddToPhysicalScene(isFlying);
if (m_appearance.AvatarHeight > 0)
SetHeight(m_appearance.AvatarHeight);
SendTerseUpdateToAllClients(); SendTerseUpdateToAllClients();
} }
@ -1825,12 +1815,6 @@ namespace OpenSim.Region.Framework.Scenes
m_parentID = 0; m_parentID = 0;
SendAvatarDataToAllAgents(); SendAvatarDataToAllAgents();
m_requestedSitTargetID = 0; m_requestedSitTargetID = 0;
if (m_physicsActor != null)
{
if (m_appearance.AvatarHeight > 0)
SetHeight(m_appearance.AvatarHeight);
}
} }
Animator.TrySetMovementAnimation("STAND"); 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.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong
m_physicsActor.SubscribeEvents(500); m_physicsActor.SubscribeEvents(500);
m_physicsActor.LocalID = LocalId; m_physicsActor.LocalID = LocalId;
SetHeight(m_appearance.AvatarHeight);
} }
private void OutOfBoundsCall(Vector3 pos) private void OutOfBoundsCall(Vector3 pos)