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 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/Avatar') 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); } -- cgit v1.1