diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d8723f630d..bdafce8db7 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -1115,6 +1115,9 @@ namespace OpenSim.Region.Environment.Scenes m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing; m_sceneGridService.OnCloseAgentConnection += CloseConnection; m_sceneGridService.OnRegionUp += OtherRegionUp; + + m_sceneGridService.KillObject = SendKillObject; + // Tell Other regions that I'm here. } diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 0355a1bbd9..9a837109e2 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -10,6 +10,8 @@ using OpenSim.Framework.Communications; namespace OpenSim.Region.Environment.Scenes { + public delegate void KillObjectDelegate(uint localID); + public class SceneCommunicationService //one instance per region { protected CommunicationsManager m_commsProvider; @@ -22,8 +24,11 @@ namespace OpenSim.Region.Environment.Scenes public event CloseAgentConnection OnCloseAgentConnection; public event PrimCrossing OnPrimCrossingIntoRegion; public event RegionUp OnRegionUp; + + public KillObjectDelegate KillObject; public string _debugRegionName = ""; + public string debugRegionName { get { return _debugRegionName; } @@ -276,6 +281,10 @@ namespace OpenSim.Region.Environment.Scenes string capsPath = Util.GetCapsURL(avatar.ControllingClient.AgentId); avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), capsPath); avatar.MakeChildAgent(); + if (KillObject != null) + { + KillObject(avatar.LocalId); + } uint newRegionX = (uint)(regionHandle >> 40); uint newRegionY = (((uint)(regionHandle)) >> 8); uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40);