mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user