From 6674548af006484da0d213f2775b9406a163f31f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 21 Aug 2014 22:42:45 +0100 Subject: [PATCH] replace AgentHasMovedAway + KillEntity by a hacked version on teleports --- .../Framework/EntityTransfer/EntityTransferModule.cs | 11 +++++++---- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 ++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index d5eca03f09..781fc400e5 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -981,10 +981,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // May need to logout or other cleanup // AgentHasMovedAway(sp, logout); - AgentHasMovedAway(sp, true); // until logout use is checked +// AgentHasMovedAway(sp, true); // until logout use is checked // Well, this is it. The agent is over there. - KillEntity(sp.Scene, sp.LocalId); +// KillEntity(sp.Scene, sp.LocalId); + + sp.HasMovedAway(); // Now let's make it officially a child agent sp.MakeChildAgent(); @@ -1147,12 +1149,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // abandoned without proper close by viewer but then re-used by an incoming connection. sp.CloseChildAgents(newRegionX, newRegionY); + sp.HasMovedAway(); // May need to logout or other cleanup // AgentHasMovedAway(sp, logout); - AgentHasMovedAway(sp, true); +// AgentHasMovedAway(sp, true); // Well, this is it. The agent is over there. - KillEntity(sp.Scene, sp.LocalId); +// KillEntity(sp.Scene, sp.LocalId); // Now let's make it officially a child agent sp.MakeChildAgent(); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c46a5ad0dc..f9266b4eab 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -5652,7 +5652,7 @@ namespace OpenSim.Region.Framework.Scenes public void parcelRegionCross() { - if (!ParcelHideThisAvatar || IsChildAgent || GodLevel >= 200) + if (!ParcelHideThisAvatar || GodLevel >= 200) return; List allpresences = null; @@ -5846,6 +5846,15 @@ namespace OpenSim.Region.Framework.Scenes } } + public void HasMovedAway() + { + List allpresences = m_scene.GetScenePresences(); + foreach (ScenePresence p in allpresences) + SendKillTo(p); + if (Scene.AttachmentsModule != null) + Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); + } + public void SendKillTo(ScenePresence p) { foreach (SceneObjectGroup sog in m_attachments)