Stop having to call SetHeight again in ScenePresence.AddToPhysicalScene() when we've already passed size information to the avatar at PhysicsScene.AddAvatar()

Eliminate some copypasta for height setting in OdeCharacter
This commit is contained in:
Justin Clark-Casey (justincc)
2011-12-15 22:29:36 +00:00
parent 99570d8ebb
commit c0ba99e5ad
4 changed files with 27 additions and 24 deletions

View File

@@ -1149,13 +1149,11 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Sets avatar height in the physics plugin
/// </summary>
/// <param name="height">New height of avatar</param>
public void SetHeight(float height)
{
if (PhysicsActor != null && !IsChildAgent)
{
Vector3 SetSize = new Vector3(0.45f, 0.6f, height);
PhysicsActor.Size = SetSize;
}
PhysicsActor.Size = new Vector3(0.45f, 0.6f, height);
}
/// <summary>
@@ -3273,8 +3271,6 @@ namespace OpenSim.Region.Framework.Scenes
PhysicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong
PhysicsActor.SubscribeEvents(500);
PhysicsActor.LocalID = LocalId;
SetHeight(Appearance.AvatarHeight);
}
private void OutOfBoundsCall(Vector3 pos)