aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs39
1 files changed, 25 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3c97852..2748a75 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -794,15 +794,6 @@ namespace OpenSim.Region.Framework.Scenes
794 794
795 AdjustKnownSeeds(); 795 AdjustKnownSeeds();
796 796
797 // we created a new ScenePresence (a new child agent) in a fresh region.
798 // Request info about all the (root) agents in this region
799 // Note: This won't send data *to* other clients in that region (children don't send)
800
801// MIC: This gets called again in CompleteMovement
802 // SendInitialFullUpdateToAllClients();
803 SendOtherAgentsAvatarDataToMe();
804 SendOtherAgentsAppearanceToMe();
805
806 RegisterToEvents(); 797 RegisterToEvents();
807 SetDirectionVectors(); 798 SetDirectionVectors();
808 799
@@ -1207,9 +1198,9 @@ namespace OpenSim.Region.Framework.Scenes
1207 { 1198 {
1208// DateTime startTime = DateTime.Now; 1199// DateTime startTime = DateTime.Now;
1209 1200
1210 m_log.DebugFormat( 1201// m_log.DebugFormat(
1211 "[SCENE PRESENCE]: Completing movement of {0} into region {1}", 1202// "[SCENE PRESENCE]: Completing movement of {0} into region {1}",
1212 client.Name, Scene.RegionInfo.RegionName); 1203// client.Name, Scene.RegionInfo.RegionName);
1213 1204
1214 Vector3 look = Velocity; 1205 Vector3 look = Velocity;
1215 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) 1206 if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
@@ -1241,7 +1232,7 @@ namespace OpenSim.Region.Framework.Scenes
1241 //m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); 1232 //m_log.DebugFormat("[SCENE PRESENCE] Completed movement");
1242 1233
1243 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); 1234 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
1244 SendInitialData(); 1235 ValidateAndSendAppearanceAndAgentData();
1245 1236
1246 // Create child agents in neighbouring regions 1237 // Create child agents in neighbouring regions
1247 if (openChildAgents && !IsChildAgent) 1238 if (openChildAgents && !IsChildAgent)
@@ -2531,11 +2522,31 @@ namespace OpenSim.Region.Framework.Scenes
2531 ControllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations); 2522 ControllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations);
2532 } 2523 }
2533 2524
2525 public void SendInitialDataToMe()
2526 {
2527 // Send all scene object to the new client
2528 Util.FireAndForget(delegate
2529 {
2530 // we created a new ScenePresence (a new child agent) in a fresh region.
2531 // Request info about all the (root) agents in this region
2532 // Note: This won't send data *to* other clients in that region (children don't send)
2533 SendOtherAgentsAvatarDataToMe();
2534 SendOtherAgentsAppearanceToMe();
2535
2536 EntityBase[] entities = Scene.Entities.GetEntities();
2537 foreach(EntityBase e in entities)
2538 {
2539 if (e != null && e is SceneObjectGroup)
2540 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
2541 }
2542 });
2543 }
2544
2534 /// <summary> 2545 /// <summary>
2535 /// Do everything required once a client completes its movement into a region and becomes 2546 /// Do everything required once a client completes its movement into a region and becomes
2536 /// a root agent. 2547 /// a root agent.
2537 /// </summary> 2548 /// </summary>
2538 private void SendInitialData() 2549 private void ValidateAndSendAppearanceAndAgentData()
2539 { 2550 {
2540 //m_log.DebugFormat("[SCENE PRESENCE] SendInitialData: {0} ({1})", Name, UUID); 2551 //m_log.DebugFormat("[SCENE PRESENCE] SendInitialData: {0} ({1})", Name, UUID);
2541 // Moved this into CompleteMovement to ensure that Appearance is initialized before 2552 // Moved this into CompleteMovement to ensure that Appearance is initialized before