From 1d5e870ee2a45d6df6f2114c8df90de0015bcb6e Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 14 Sep 2008 02:56:51 +0000 Subject: Thank you kindly, CMickeyb for a patch that: Moved intialization of appearance from the SendInitialData event handler into CompleteMovement handler. That ensures that m_appearance is initialized before the inventory is retrieved (so there is a place to check on attachments). --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index f58bba6..7428612 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -805,6 +805,11 @@ namespace OpenSim.Region.Environment.Scenes m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); + // Moved this from SendInitialData to ensure that m_appearance is initialized + // before the inventory is processed in MakeRootAgent. This fixes a race condition + // related to the handling of attachments + m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); + if (m_isChildAgent) { m_isChildAgent = false; @@ -1712,14 +1717,14 @@ namespace OpenSim.Region.Environment.Scenes m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); } - /// /// Do everything required once a client completes its movement into a region /// public void SendInitialData() { - // Needed for standalone - m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); + // Moved this into CompleteMovement to ensure that m_appearance is initialized before + // the inventory arrives + // m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); // Note: because Quaternion is a struct, it can't be null Quaternion rot = m_bodyRot; -- cgit v1.1