aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs89
1 files changed, 31 insertions, 58 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 357a94b..28fce53 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2644,7 +2644,6 @@ namespace OpenSim.Region.Framework.Scenes
2644 2644
2645 } 2645 }
2646 } 2646 }
2647
2648 2647
2649 return null; 2648 return null;
2650 } 2649 }
@@ -2862,7 +2861,10 @@ namespace OpenSim.Region.Framework.Scenes
2862// "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); 2861// "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition);
2863 2862
2864 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 2863 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2865 2864
2865 // We must currently not resume scripts at this stage since AttachmentsModule does not have the
2866 // information that this is due to a teleport/border cross rather than an ordinary attachment.
2867 // We currently do this in Scene.MakeRootAgent() instead.
2866 if (AttachmentsModule != null) 2868 if (AttachmentsModule != null)
2867 AttachmentsModule.AttachObject(sp, grp, 0, false, false, false, true); 2869 AttachmentsModule.AttachObject(sp, grp, 0, false, false, false, true);
2868 } 2870 }
@@ -2979,35 +2981,6 @@ namespace OpenSim.Region.Framework.Scenes
2979 m_eventManager.TriggerOnNewPresence(sp); 2981 m_eventManager.TriggerOnNewPresence(sp);
2980 2982
2981 sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags; 2983 sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags;
2982
2983 // The first agent upon login is a root agent by design.
2984 // For this agent we will have to rez the attachments.
2985 // All other AddNewClient calls find aCircuit.child to be true.
2986 if (aCircuit.child == false)
2987 {
2988 // We have to set SP to be a root agent here so that SP.MakeRootAgent() will later not try to
2989 // start the scripts again (since this is done in RezAttachments()).
2990 // XXX: This is convoluted.
2991 sp.IsChildAgent = false;
2992 sp.IsLoggingIn = true;
2993
2994 // We leave a 5 second pause before attempting to rez attachments to avoid a clash with
2995 // version 3 viewers that maybe doing their own attachment rezzing related to their current
2996 // outfit folder on startup. If these operations do clash, then the symptoms are invisible
2997 // attachments until one zooms in on the avatar.
2998 //
2999 // We do not pause if we are launching on the same thread anyway in order to avoid pointlessly
3000 // delaying any attachment related regression tests.
3001 if (AttachmentsModule != null)
3002 Util.FireAndForget(
3003 o =>
3004 {
3005 if (Util.FireAndForgetMethod != FireAndForgetMethod.None)
3006 Thread.Sleep(5000);
3007
3008 AttachmentsModule.RezAttachments(sp);
3009 });
3010 }
3011 } 2984 }
3012 else 2985 else
3013 { 2986 {
@@ -4344,33 +4317,33 @@ namespace OpenSim.Region.Framework.Scenes
4344// } 4317// }
4345// } 4318// }
4346 4319
4347 /// <summary> 4320// /// <summary>
4348 /// Triggered when an agent crosses into this sim. Also happens on initial login. 4321// /// Triggered when an agent crosses into this sim. Also happens on initial login.
4349 /// </summary> 4322// /// </summary>
4350 /// <param name="agentID"></param> 4323// /// <param name="agentID"></param>
4351 /// <param name="position"></param> 4324// /// <param name="position"></param>
4352 /// <param name="isFlying"></param> 4325// /// <param name="isFlying"></param>
4353 public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying) 4326// public virtual void AgentCrossing(UUID agentID, Vector3 position, bool isFlying)
4354 { 4327// {
4355 ScenePresence presence = GetScenePresence(agentID); 4328// ScenePresence presence = GetScenePresence(agentID);
4356 if (presence != null) 4329// if (presence != null)
4357 { 4330// {
4358 try 4331// try
4359 { 4332// {
4360 presence.MakeRootAgent(position, isFlying); 4333// presence.MakeRootAgent(position, isFlying);
4361 } 4334// }
4362 catch (Exception e) 4335// catch (Exception e)
4363 { 4336// {
4364 m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}{1}", e.Message, e.StackTrace); 4337// m_log.ErrorFormat("[SCENE]: Unable to do agent crossing, exception {0}{1}", e.Message, e.StackTrace);
4365 } 4338// }
4366 } 4339// }
4367 else 4340// else
4368 { 4341// {
4369 m_log.ErrorFormat( 4342// m_log.ErrorFormat(
4370 "[SCENE]: Could not find presence for agent {0} crossing into scene {1}", 4343// "[SCENE]: Could not find presence for agent {0} crossing into scene {1}",
4371 agentID, RegionInfo.RegionName); 4344// agentID, RegionInfo.RegionName);
4372 } 4345// }
4373 } 4346// }
4374 4347
4375 /// <summary> 4348 /// <summary>
4376 /// We've got an update about an agent that sees into this region, 4349 /// We've got an update about an agent that sees into this region,