aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2014-08-27 00:37:05 +0100
committerUbitUmarov2014-08-27 00:37:05 +0100
commit620443f85840aab0f2ddc4a88656a166cc148b69 (patch)
tree67b9c79115179148174cf16e5857c4d7a1e79345 /OpenSim
parent dont append acks to a resend packet (diff)
downloadopensim-SC_OLD-620443f85840aab0f2ddc4a88656a166cc148b69.zip
opensim-SC_OLD-620443f85840aab0f2ddc4a88656a166cc148b69.tar.gz
opensim-SC_OLD-620443f85840aab0f2ddc4a88656a166cc148b69.tar.bz2
opensim-SC_OLD-620443f85840aab0f2ddc4a88656a166cc148b69.tar.xz
on TPs to nearby regions, only send kills if needed by parcel privacy
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs38
2 files changed, 37 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 37aae08..b3e556f 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -986,7 +986,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
986 // Well, this is it. The agent is over there. 986 // Well, this is it. The agent is over there.
987// KillEntity(sp.Scene, sp.LocalId); 987// KillEntity(sp.Scene, sp.LocalId);
988 988
989 sp.HasMovedAway(); 989 bool nearRegion = sp.KnownRegions.ContainsKey(destinationHandle);
990 sp.HasMovedAway(nearRegion);
990 991
991 // Now let's make it officially a child agent 992 // Now let's make it officially a child agent
992 sp.MakeChildAgent(); 993 sp.MakeChildAgent();
@@ -1141,7 +1142,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1141 1142
1142 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); 1143 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
1143 1144
1144 sp.HasMovedAway(); 1145 bool nearRegion = sp.KnownRegions.ContainsKey(destinationHandle);
1146 sp.HasMovedAway(nearRegion);
1145 1147
1146 // Need to signal neighbours whether child agents may need closing irrespective of whether this 1148 // Need to signal neighbours whether child agents may need closing irrespective of whether this
1147 // one needed closing. We also need to close child agents as quickly as possible to avoid complicated 1149 // one needed closing. We also need to close child agents as quickly as possible to avoid complicated
@@ -1784,9 +1786,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1784 m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); 1786 m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
1785 1787
1786 // this may need the attachments 1788 // this may need the attachments
1787 agent.parcelRegionCross();
1788 1789
1789 AgentHasMovedAway(agent, true); 1790 agent.HasMovedAway(true);
1791// agent.parcelRegionCross();
1792
1793// AgentHasMovedAway(agent, true);
1790 1794
1791 agent.MakeChildAgent(); 1795 agent.MakeChildAgent();
1792 1796
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 2b1b342..d7656e8 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -5962,18 +5962,38 @@ namespace OpenSim.Region.Framework.Scenes
5962 } 5962 }
5963 } 5963 }
5964 5964
5965 public void HasMovedAway() 5965 public void HasMovedAway(bool nearRegion)
5966 { 5966 {
5967 List<ScenePresence> allpresences = m_scene.GetScenePresences(); 5967
5968 foreach (ScenePresence p in allpresences) 5968 if (nearRegion)
5969 { 5969 {
5970 if (p == this) 5970 if (!ParcelHideThisAvatar || GodLevel >= 200)
5971 continue; 5971 return;
5972 SendKillTo(p); 5972
5973 if (!p.IsChildAgent) 5973 List<ScenePresence> allpresences = m_scene.GetScenePresences();
5974 p.SendKillTo(this); 5974 foreach (ScenePresence p in allpresences)
5975 } 5975 {
5976 if (p.IsDeleted || p == this || p.IsChildAgent || p.ControllingClient == null || !p.ControllingClient.IsActive)
5977 continue;
5976 5978
5979 if (p.currentParcelUUID == m_currentParcelUUID)
5980 {
5981 p.SendKillTo(this);
5982 }
5983 }
5984 }
5985 else
5986 {
5987 List<ScenePresence> allpresences = m_scene.GetScenePresences();
5988 foreach (ScenePresence p in allpresences)
5989 {
5990 if (p == this)
5991 continue;
5992 SendKillTo(p);
5993 if (!p.IsChildAgent)
5994 p.SendKillTo(this);
5995 }
5996 }
5977 if (Scene.AttachmentsModule != null) 5997 if (Scene.AttachmentsModule != null)
5978 Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); 5998 Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true);
5979 } 5999 }