aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs60
1 files changed, 26 insertions, 34 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 9f8ada3..4d796fe 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -958,14 +958,7 @@ namespace OpenSim.Region.Framework.Scenes
958 // Viewers which have a current outfit folder will actually rez their own attachments. However, 958 // Viewers which have a current outfit folder will actually rez their own attachments. However,
959 // viewers without (e.g. v1 viewers) will not, so we still need to make this call. 959 // viewers without (e.g. v1 viewers) will not, so we still need to make this call.
960 if (Scene.AttachmentsModule != null) 960 if (Scene.AttachmentsModule != null)
961 Util.FireAndForget( 961 Scene.AttachmentsModule.RezAttachments(this);
962 o =>
963 {
964// if (PresenceType != PresenceType.Npc && Util.FireAndForgetMethod != FireAndForgetMethod.None)
965// System.Threading.Thread.Sleep(7000);
966
967 Scene.AttachmentsModule.RezAttachments(this);
968 });
969 } 962 }
970 else 963 else
971 { 964 {
@@ -1362,18 +1355,6 @@ namespace OpenSim.Region.Framework.Scenes
1362 1355
1363 ValidateAndSendAppearanceAndAgentData(); 1356 ValidateAndSendAppearanceAndAgentData();
1364 1357
1365 // Create child agents in neighbouring regions
1366 if (openChildAgents && !IsChildAgent)
1367 {
1368 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
1369 if (m_agentTransfer != null)
1370 Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); });
1371
1372 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
1373 if (friendsModule != null)
1374 friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
1375 }
1376
1377 // XXX: If we force an update here, then multiple attachments do appear correctly on a destination region 1358 // XXX: If we force an update here, then multiple attachments do appear correctly on a destination region
1378 // If we do it a little bit earlier (e.g. when converting the child to a root agent) then this does not work. 1359 // If we do it a little bit earlier (e.g. when converting the child to a root agent) then this does not work.
1379 // This may be due to viewer code or it may be something we're not doing properly simulator side. 1360 // This may be due to viewer code or it may be something we're not doing properly simulator side.
@@ -1383,6 +1364,19 @@ namespace OpenSim.Region.Framework.Scenes
1383 sog.ScheduleGroupForFullUpdate(); 1364 sog.ScheduleGroupForFullUpdate();
1384 } 1365 }
1385 1366
1367 // Create child agents in neighbouring regions
1368 if (openChildAgents && !IsChildAgent)
1369 {
1370 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
1371 if (friendsModule != null)
1372 friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
1373
1374 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
1375 if (m_agentTransfer != null)
1376 m_agentTransfer.EnableChildAgents(this); // this can take a while... several seconds
1377
1378 }
1379
1386// m_log.DebugFormat( 1380// m_log.DebugFormat(
1387// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", 1381// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
1388// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); 1382// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
@@ -2689,22 +2683,20 @@ namespace OpenSim.Region.Framework.Scenes
2689 public void SendInitialDataToMe() 2683 public void SendInitialDataToMe()
2690 { 2684 {
2691 // Send all scene object to the new client 2685 // Send all scene object to the new client
2692 Util.FireAndForget(delegate 2686
2687 // we created a new ScenePresence (a new child agent) in a fresh region.
2688 // Request info about all the (root) agents in this region
2689 // Note: This won't send data *to* other clients in that region (children don't send)
2690 SendOtherAgentsAvatarDataToMe();
2691 SendOtherAgentsAppearanceToMe();
2692
2693 EntityBase[] entities = Scene.Entities.GetEntities();
2694 foreach (EntityBase e in entities)
2693 { 2695 {
2694 // we created a new ScenePresence (a new child agent) in a fresh region. 2696 if (e != null && e is SceneObjectGroup)
2695 // Request info about all the (root) agents in this region 2697 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
2696 // Note: This won't send data *to* other clients in that region (children don't send) 2698 }
2697 SendOtherAgentsAvatarDataToMe();
2698 SendOtherAgentsAppearanceToMe();
2699
2700 EntityBase[] entities = Scene.Entities.GetEntities();
2701 foreach (EntityBase e in entities)
2702 {
2703 if (e != null && e is SceneObjectGroup)
2704 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
2705 }
2706 2699
2707 });
2708 } 2700 }
2709 2701
2710 /// <summary> 2702 /// <summary>