On setting a new avatar appearance, if height hasn't changed then don't set that same height in ScenePresence.

This prevents unnecessary work in the ODE module, though possibly that should be checking against same size sets itself
remove-scene-viewer
Justin Clark-Casey (justincc) 2011-09-17 00:26:53 +01:00
parent 744602f6d1
commit 385c4a210d
2 changed files with 7 additions and 1 deletions

View File

@ -211,8 +211,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
// Process the visual params, this may change height as well // Process the visual params, this may change height as well
if (visualParams != null) if (visualParams != null)
{ {
float oldHeight = sp.Appearance.AvatarHeight;
changed = sp.Appearance.SetVisualParams(visualParams); changed = sp.Appearance.SetVisualParams(visualParams);
if (sp.Appearance.AvatarHeight > 0)
if (sp.Appearance.AvatarHeight != oldHeight && sp.Appearance.AvatarHeight > 0)
sp.SetHeight(sp.Appearance.AvatarHeight); sp.SetHeight(sp.Appearance.AvatarHeight);
} }

View File

@ -3308,6 +3308,10 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary> /// </summary>
public void AddToPhysicalScene(bool isFlying) public void AddToPhysicalScene(bool isFlying)
{ {
// m_log.DebugFormat(
// "[SCENE PRESENCE]: Adding physics actor for {0}, ifFlying = {1} in {2}",
// Name, isFlying, Scene.RegionInfo.RegionName);
if (m_appearance.AvatarHeight == 0) if (m_appearance.AvatarHeight == 0)
m_appearance.SetHeight(); m_appearance.SetHeight();