aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 4b785e9..1694613 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -412,7 +412,12 @@ namespace OpenSim.Region.Environment.Scenes
412 412
413 AbsolutePosition = m_controllingClient.StartPos; 413 AbsolutePosition = m_controllingClient.StartPos;
414 414
415 TrySetMovementAnimation("STAND"); 415 TrySetMovementAnimation("STAND"); // TODO: I think, this won't send anything, as we are still a child here...
416
417 // we created a new ScenePresence (a new child agent) in a fresh region.
418 // Request info about all the (root) agents in this region
419 // Note: This won't send data *to* other clients in that region (children don't send)
420 SendInitialFullUpdateToAllClients();
416 421
417 RegisterToEvents(); 422 RegisterToEvents();
418 SetDirectionVectors(); 423 SetDirectionVectors();
@@ -1674,11 +1679,15 @@ namespace OpenSim.Region.Environment.Scenes
1674 List<ScenePresence> avatars = m_scene.GetScenePresences(); 1679 List<ScenePresence> avatars = m_scene.GetScenePresences();
1675 foreach (ScenePresence avatar in avatars) 1680 foreach (ScenePresence avatar in avatars)
1676 { 1681 {
1677 SendFullUpdateToOtherClient(avatar); 1682 // only send if this is the root (children are only "listening posts" in a foreign region)
1683 if (!IsChildAgent)
1684 {
1685 SendFullUpdateToOtherClient(avatar);
1686 }
1678 1687
1679 if (avatar.LocalId != LocalId) 1688 if (avatar.LocalId != LocalId)
1680 { 1689 {
1681 if (!avatar.m_isChildAgent || m_scene.m_seeIntoRegionFromNeighbor) 1690 if (!avatar.IsChildAgent)
1682 { 1691 {
1683 avatar.SendFullUpdateToOtherClient(this); 1692 avatar.SendFullUpdateToOtherClient(this);
1684 avatar.SendAppearanceToOtherAgent(this); 1693 avatar.SendAppearanceToOtherAgent(this);
@@ -1694,7 +1703,8 @@ namespace OpenSim.Region.Environment.Scenes
1694 { 1703 {
1695 m_perfMonMS = System.Environment.TickCount; 1704 m_perfMonMS = System.Environment.TickCount;
1696 1705
1697 List<ScenePresence> avatars = m_scene.GetScenePresences(); 1706 // only send update from root agents to other clients; children are only "listening posts"
1707 List<ScenePresence> avatars = m_scene.GetAvatars();
1698 foreach (ScenePresence avatar in avatars) 1708 foreach (ScenePresence avatar in avatars)
1699 { 1709 {
1700 SendFullUpdateToOtherClient(avatar); 1710 SendFullUpdateToOtherClient(avatar);
@@ -2008,9 +2018,13 @@ namespace OpenSim.Region.Environment.Scenes
2008 m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, 2018 m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
2009 capsPath); 2019 capsPath);
2010 MakeChildAgent(); 2020 MakeChildAgent();
2021 // now we have a child agent in this region. Request all interesting data about other (root) agents
2022 SendInitialFullUpdateToAllClients();
2023
2011 CrossAttachmentsIntoNewRegion(neighbourHandle); 2024 CrossAttachmentsIntoNewRegion(neighbourHandle);
2012 2025
2013 m_scene.SendKillObject(m_localId); 2026 m_scene.SendKillObject(m_localId);
2027
2014 m_scene.NotifyMyCoarseLocationChange(); 2028 m_scene.NotifyMyCoarseLocationChange();
2015 // the user may change their profile information in other region, 2029 // the user may change their profile information in other region,
2016 // so the userinfo in UserProfileCache is not reliable any more, delete it 2030 // so the userinfo in UserProfileCache is not reliable any more, delete it