aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorMelanie2013-03-29 01:50:34 +0000
committerMelanie2013-03-29 01:50:34 +0000
commit120903efb66f30ba5d009ceed7203a5589e2ff80 (patch)
treeff3a3e697464cfc96d95df2a5c822ca3ee30529b /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentMerge commit '6a9630d2bdc27ed702936f4c44e6978f728a9ef0' into careminster (diff)
parentMove the simulator-side RezAttachments call on login to SP.MakeRootAgent with... (diff)
downloadopensim-SC-120903efb66f30ba5d009ceed7203a5589e2ff80.zip
opensim-SC-120903efb66f30ba5d009ceed7203a5589e2ff80.tar.gz
opensim-SC-120903efb66f30ba5d009ceed7203a5589e2ff80.tar.bz2
opensim-SC-120903efb66f30ba5d009ceed7203a5589e2ff80.tar.xz
Merge commit 'c2093ccce16cd5210c8e0759f23b5b4bd205b7af' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs53
1 files changed, 38 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 322afd2..300ddb3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -941,8 +941,6 @@ namespace OpenSim.Region.Framework.Scenes
941 "[SCENE]: Upgrading child to root agent for {0} in {1}", 941 "[SCENE]: Upgrading child to root agent for {0} in {1}",
942 Name, m_scene.RegionInfo.RegionName); 942 Name, m_scene.RegionInfo.RegionName);
943 943
944 bool wasChild = IsChildAgent;
945
946 if (ParentUUID != UUID.Zero) 944 if (ParentUUID != UUID.Zero)
947 { 945 {
948 m_log.DebugFormat("[SCENE PRESENCE]: Sitting avatar back on prim {0}", ParentUUID); 946 m_log.DebugFormat("[SCENE PRESENCE]: Sitting avatar back on prim {0}", ParentUUID);
@@ -975,6 +973,9 @@ namespace OpenSim.Region.Framework.Scenes
975 IsLoggingIn = false; 973 IsLoggingIn = false;
976 } 974 }
977 975
976 //m_log.DebugFormat("[SCENE]: known regions in {0}: {1}", Scene.RegionInfo.RegionName, KnownChildRegionHandles.Count);
977
978 IsChildAgent = false;
978 979
979 IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); 980 IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
980 if (gm != null) 981 if (gm != null)
@@ -1095,22 +1096,44 @@ namespace OpenSim.Region.Framework.Scenes
1095 // and it has already rezzed the attachments and started their scripts. 1096 // and it has already rezzed the attachments and started their scripts.
1096 // We do the following only for non-login agents, because their scripts 1097 // We do the following only for non-login agents, because their scripts
1097 // haven't started yet. 1098 // haven't started yet.
1098 lock (m_attachments) 1099 if ((TeleportFlags & TeleportFlags.ViaLogin) != 0)
1100 {
1101 // We leave a 5 second pause before attempting to rez attachments to avoid a clash with
1102 // version 3 viewers that maybe doing their own attachment rezzing related to their current
1103 // outfit folder on startup. If these operations do clash, then the symptoms are invisible
1104 // attachments until one zooms in on the avatar.
1105 //
1106 // We do not pause if we are launching on the same thread anyway in order to avoid pointlessly
1107 // delaying any attachment related regression tests.
1108 if (Scene.AttachmentsModule != null)
1109 Util.FireAndForget(
1110 o =>
1111 {
1112 if (Util.FireAndForgetMethod != FireAndForgetMethod.None)
1113 System.Threading.Thread.Sleep(5000);
1114
1115 Scene.AttachmentsModule.RezAttachments(this);
1116 });
1117 }
1118 else
1099 { 1119 {
1100 if (wasChild && HasAttachments()) 1120 lock (m_attachments)
1101 { 1121 {
1102 m_log.DebugFormat( 1122 if (HasAttachments())
1103 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); 1123 {
1124 m_log.DebugFormat(
1125 "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name);
1104 1126
1105 // Resume scripts 1127 // Resume scripts
1106 Util.FireAndForget(delegate(object x) { 1128 Util.FireAndForget(delegate(object x) {
1107 foreach (SceneObjectGroup sog in m_attachments) 1129 foreach (SceneObjectGroup sog in m_attachments)
1108 { 1130 {
1109 sog.ScheduleGroupForFullUpdate(); 1131 sog.ScheduleGroupForFullUpdate();
1110 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); 1132 sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource());
1111 sog.ResumeScripts(); 1133 sog.ResumeScripts();
1112 } 1134 }
1113 }); 1135 });
1136 }
1114 } 1137 }
1115 } 1138 }
1116 1139