From 28c97257302a6f6596dca0b79f4c57f0e7f28225 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 5 Apr 2019 12:31:43 +0100 Subject: [PATCH] kill avatar on agents that do not see its new region --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a52fa76e14..c728d9b235 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1655,6 +1655,14 @@ namespace OpenSim.Region.Framework.Scenes CollisionPlane = Vector4.UnitW; + // we need to kill this on agents that do not see the new region + m_scene.ForEachRootScenePresence(delegate(ScenePresence p) + { + if (!p.knowsNeighbourRegion(newRegionHandle)) + { + SendKillTo(p); + } + }); m_scene.EventManager.TriggerOnMakeChildAgent(this); }