aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMW2007-11-27 15:44:39 +0000
committerMW2007-11-27 15:44:39 +0000
commitb916d5b112990bac8b412fa8ddb83be87b25e02c (patch)
treedb6ee74ff39da7e32ac73d1a4abdb4d1fdbb4221 /OpenSim/Region/Environment
parentRemove unused function, one less warning (diff)
downloadopensim-SC_OLD-b916d5b112990bac8b412fa8ddb83be87b25e02c.zip
opensim-SC_OLD-b916d5b112990bac8b412fa8ddb83be87b25e02c.tar.gz
opensim-SC_OLD-b916d5b112990bac8b412fa8ddb83be87b25e02c.tar.bz2
opensim-SC_OLD-b916d5b112990bac8b412fa8ddb83be87b25e02c.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs9
2 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index d8723f6..bdafce8 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1115,6 +1115,9 @@ namespace OpenSim.Region.Environment.Scenes
1115 m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing; 1115 m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing;
1116 m_sceneGridService.OnCloseAgentConnection += CloseConnection; 1116 m_sceneGridService.OnCloseAgentConnection += CloseConnection;
1117 m_sceneGridService.OnRegionUp += OtherRegionUp; 1117 m_sceneGridService.OnRegionUp += OtherRegionUp;
1118
1119 m_sceneGridService.KillObject = SendKillObject;
1120
1118 // Tell Other regions that I'm here. 1121 // Tell Other regions that I'm here.
1119 1122
1120 } 1123 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 0355a1b..9a83710 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -10,6 +10,8 @@ using OpenSim.Framework.Communications;
10 10
11namespace OpenSim.Region.Environment.Scenes 11namespace OpenSim.Region.Environment.Scenes
12{ 12{
13 public delegate void KillObjectDelegate(uint localID);
14
13 public class SceneCommunicationService //one instance per region 15 public class SceneCommunicationService //one instance per region
14 { 16 {
15 protected CommunicationsManager m_commsProvider; 17 protected CommunicationsManager m_commsProvider;
@@ -22,8 +24,11 @@ namespace OpenSim.Region.Environment.Scenes
22 public event CloseAgentConnection OnCloseAgentConnection; 24 public event CloseAgentConnection OnCloseAgentConnection;
23 public event PrimCrossing OnPrimCrossingIntoRegion; 25 public event PrimCrossing OnPrimCrossingIntoRegion;
24 public event RegionUp OnRegionUp; 26 public event RegionUp OnRegionUp;
27
28 public KillObjectDelegate KillObject;
25 public string _debugRegionName = ""; 29 public string _debugRegionName = "";
26 30
31
27 public string debugRegionName 32 public string debugRegionName
28 { 33 {
29 get { return _debugRegionName; } 34 get { return _debugRegionName; }
@@ -276,6 +281,10 @@ namespace OpenSim.Region.Environment.Scenes
276 string capsPath = Util.GetCapsURL(avatar.ControllingClient.AgentId); 281 string capsPath = Util.GetCapsURL(avatar.ControllingClient.AgentId);
277 avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), capsPath); 282 avatar.ControllingClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), capsPath);
278 avatar.MakeChildAgent(); 283 avatar.MakeChildAgent();
284 if (KillObject != null)
285 {
286 KillObject(avatar.LocalId);
287 }
279 uint newRegionX = (uint)(regionHandle >> 40); 288 uint newRegionX = (uint)(regionHandle >> 40);
280 uint newRegionY = (((uint)(regionHandle)) >> 8); 289 uint newRegionY = (((uint)(regionHandle)) >> 8);
281 uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40); 290 uint oldRegionX = (uint)(m_regionInfo.RegionHandle >> 40);