From c80733cc985411937f59c6cd93e52989d00a13a2 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 3 Feb 2009 14:11:52 +0000 Subject: * Fixes mantis #3070 --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 4bb1f84..7c0df39 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -2213,6 +2213,14 @@ namespace OpenSim.Region.Environment.Scenes /// public void SetAppearance(byte[] texture, List visualParam) { + if (m_physicsActor != null) + { + // This may seem like it's redundant, remove the avatar from the physics scene + // just to add it back again, but it saves us from having to update + // 3 variables 10 times a second. + m_scene.PhysicsScene.RemoveAvatar(m_physicsActor); + AddToPhysicalScene(); + } m_appearance.SetAppearance(texture, visualParam); SetHeight(m_appearance.AvatarHeight); m_scene.CommsManager.AvatarService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance); -- cgit v1.1