aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2008-09-14 02:56:51 +0000
committerCharles Krinke2008-09-14 02:56:51 +0000
commit1d5e870ee2a45d6df6f2114c8df90de0015bcb6e (patch)
tree916df21c5763a67cee9ea4456638a980273f390e /OpenSim
parent* Minor fixes and cleanups around code being used for Rex Module work. (diff)
downloadopensim-SC_OLD-1d5e870ee2a45d6df6f2114c8df90de0015bcb6e.zip
opensim-SC_OLD-1d5e870ee2a45d6df6f2114c8df90de0015bcb6e.tar.gz
opensim-SC_OLD-1d5e870ee2a45d6df6f2114c8df90de0015bcb6e.tar.bz2
opensim-SC_OLD-1d5e870ee2a45d6df6f2114c8df90de0015bcb6e.tar.xz
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).
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLUserData.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs11
2 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index 81acbfb..5f7db15 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -722,6 +722,12 @@ namespace OpenSim.Data.MySQL
722 reader.Dispose(); 722 reader.Dispose();
723 result.Dispose(); 723 result.Dispose();
724 724
725 if (null == appearance)
726 {
727 m_log.WarnFormat("[USER DB] No appearance found for user {0}", user.ToString());
728 return null;
729 }
730
725 appearance.SetAttachments(GetUserAttachments(user)); 731 appearance.SetAttachments(GetUserAttachments(user));
726 732
727 return appearance; 733 return appearance;
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
805 805
806 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look); 806 m_controllingClient.MoveAgentIntoRegion(m_regionInfo, AbsolutePosition, look);
807 807
808 // Moved this from SendInitialData to ensure that m_appearance is initialized
809 // before the inventory is processed in MakeRootAgent. This fixes a race condition
810 // related to the handling of attachments
811 m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
812
808 if (m_isChildAgent) 813 if (m_isChildAgent)
809 { 814 {
810 m_isChildAgent = false; 815 m_isChildAgent = false;
@@ -1712,14 +1717,14 @@ namespace OpenSim.Region.Environment.Scenes
1712 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 1717 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
1713 } 1718 }
1714 1719
1715
1716 /// <summary> 1720 /// <summary>
1717 /// Do everything required once a client completes its movement into a region 1721 /// Do everything required once a client completes its movement into a region
1718 /// </summary> 1722 /// </summary>
1719 public void SendInitialData() 1723 public void SendInitialData()
1720 { 1724 {
1721 // Needed for standalone 1725 // Moved this into CompleteMovement to ensure that m_appearance is initialized before
1722 m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); 1726 // the inventory arrives
1727 // m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
1723 1728
1724 // Note: because Quaternion is a struct, it can't be null 1729 // Note: because Quaternion is a struct, it can't be null
1725 Quaternion rot = m_bodyRot; 1730 Quaternion rot = m_bodyRot;