From 385c4a210deb63c25f082ab8a3f0c63c7bff8fb5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 17 Sep 2011 00:26:53 +0100 Subject: 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 --- .../Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 4 +++- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index c5a1828..bb63bcd 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -211,8 +211,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory // Process the visual params, this may change height as well if (visualParams != null) { + float oldHeight = sp.Appearance.AvatarHeight; changed = sp.Appearance.SetVisualParams(visualParams); - if (sp.Appearance.AvatarHeight > 0) + + if (sp.Appearance.AvatarHeight != oldHeight && sp.Appearance.AvatarHeight > 0) sp.SetHeight(sp.Appearance.AvatarHeight); } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0fc85b9..9358a4a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3308,6 +3308,10 @@ namespace OpenSim.Region.Framework.Scenes /// 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) m_appearance.SetHeight(); -- cgit v1.1