diff options
author | UbitUmarov | 2014-08-27 00:37:05 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-27 00:37:05 +0100 |
commit | 620443f85840aab0f2ddc4a88656a166cc148b69 (patch) | |
tree | 67b9c79115179148174cf16e5857c4d7a1e79345 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | dont append acks to a resend packet (diff) | |
download | opensim-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/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 38 |
1 files changed, 29 insertions, 9 deletions
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 | } |