Fixed bug, where the clients in a region weren't told to kill a user's avatar when that user teleported to a different region.

afrisby
MW 2007-11-27 15:44:39 +00:00
parent 70d547c1a5
commit b916d5b112
2 changed files with 12 additions and 0 deletions

View File

@ -1115,6 +1115,9 @@ namespace OpenSim.Region.Environment.Scenes
m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing; m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing;
m_sceneGridService.OnCloseAgentConnection += CloseConnection; m_sceneGridService.OnCloseAgentConnection += CloseConnection;
m_sceneGridService.OnRegionUp += OtherRegionUp; m_sceneGridService.OnRegionUp += OtherRegionUp;
m_sceneGridService.KillObject = SendKillObject;
// Tell Other regions that I'm here. // Tell Other regions that I'm here.
} }

View File

@ -10,6 +10,8 @@ using OpenSim.Framework.Communications;
namespace OpenSim.Region.Environment.Scenes namespace OpenSim.Region.Environment.Scenes
{ {
public delegate void KillObjectDelegate(uint localID);
public class SceneCommunicationService //one instance per region public class SceneCommunicationService //one instance per region
{ {
protected CommunicationsManager m_commsProvider; protected CommunicationsManager m_commsProvider;
@ -22,8 +24,11 @@ namespace OpenSim.Region.Environment.Scenes
public event CloseAgentConnection OnCloseAgentConnection; public event CloseAgentConnection OnCloseAgentConnection;
public event PrimCrossing OnPrimCrossingIntoRegion; public event PrimCrossing OnPrimCrossingIntoRegion;
public event RegionUp OnRegionUp; public event RegionUp OnRegionUp;
public KillObjectDelegate KillObject;
public string _debugRegionName = ""; public string _debugRegionName = "";
public string debugRegionName public string debugRegionName
{ {
get { return _debugRegionName; } get { return _debugRegionName; }
@ -276,6 +281,10 @@ namespace OpenSim.Region.Environment.Scenes
string capsPath = Util.GetCapsURL(avatar.ControllingClient.AgentId); string capsPath = Util.GetCapsURL(avatar.ControllingClient.AgentId);
avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), capsPath); avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), capsPath);
avatar.MakeChildAgent(); avatar.MakeChildAgent();
if (KillObject != null)
{
KillObject(avatar.LocalId);
}
uint newRegionX = (uint)(regionHandle >> 40); uint newRegionX = (uint)(regionHandle >> 40);
uint newRegionY = (((uint)(regionHandle)) >> 8); uint newRegionY = (((uint)(regionHandle)) >> 8);
uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40);