diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 21 |
2 files changed, 23 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index ca0cef1..eac0da7 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -243,7 +243,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
243 | 243 | ||
244 | protected virtual void OnNewClient(IClientAPI client) | 244 | protected virtual void OnNewClient(IClientAPI client) |
245 | { | 245 | { |
246 | client.OnTeleportHomeRequest += TeleportHome; | 246 | client.OnTeleportHomeRequest += TriggerTeleportHome; |
247 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; | 247 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; |
248 | 248 | ||
249 | if (!DisableInterRegionTeleportCancellation) | 249 | if (!DisableInterRegionTeleportCancellation) |
@@ -1071,7 +1071,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1071 | 1071 | ||
1072 | #region Teleport Home | 1072 | #region Teleport Home |
1073 | 1073 | ||
1074 | public virtual void TeleportHome(UUID id, IClientAPI client) | 1074 | public virtual void TriggerTeleportHome(UUID id, IClientAPI client) |
1075 | { | ||
1076 | TeleportHome(id, client); | ||
1077 | } | ||
1078 | |||
1079 | public virtual bool TeleportHome(UUID id, IClientAPI client) | ||
1075 | { | 1080 | { |
1076 | m_log.DebugFormat( | 1081 | m_log.DebugFormat( |
1077 | "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId); | 1082 | "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId); |
@@ -1086,7 +1091,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1086 | { | 1091 | { |
1087 | // can't find the Home region: Tell viewer and abort | 1092 | // can't find the Home region: Tell viewer and abort |
1088 | client.SendTeleportFailed("Your home region could not be found."); | 1093 | client.SendTeleportFailed("Your home region could not be found."); |
1089 | return; | 1094 | return false; |
1090 | } | 1095 | } |
1091 | 1096 | ||
1092 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})", | 1097 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Home region of {0} is {1} ({2}-{3})", |
@@ -1096,6 +1101,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1096 | ((Scene)(client.Scene)).RequestTeleportLocation( | 1101 | ((Scene)(client.Scene)).RequestTeleportLocation( |
1097 | client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt, | 1102 | client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt, |
1098 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); | 1103 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); |
1104 | return true; | ||
1099 | } | 1105 | } |
1100 | else | 1106 | else |
1101 | { | 1107 | { |
@@ -1103,6 +1109,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1103 | "[ENTITY TRANSFER MODULE]: No grid user information found for {0} {1}. Cannot send home.", | 1109 | "[ENTITY TRANSFER MODULE]: No grid user information found for {0} {1}. Cannot send home.", |
1104 | client.Name, client.AgentId); | 1110 | client.Name, client.AgentId); |
1105 | } | 1111 | } |
1112 | return false; | ||
1106 | } | 1113 | } |
1107 | 1114 | ||
1108 | #endregion | 1115 | #endregion |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 33ea063..02ed1a0 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -184,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
184 | 184 | ||
185 | protected override void OnNewClient(IClientAPI client) | 185 | protected override void OnNewClient(IClientAPI client) |
186 | { | 186 | { |
187 | client.OnTeleportHomeRequest += TeleportHome; | 187 | client.OnTeleportHomeRequest += TriggerTeleportHome; |
188 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; | 188 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; |
189 | client.OnConnectionClosed += new Action<IClientAPI>(OnConnectionClosed); | 189 | client.OnConnectionClosed += new Action<IClientAPI>(OnConnectionClosed); |
190 | } | 190 | } |
@@ -409,7 +409,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
409 | // return base.UpdateAgent(reg, finalDestination, agentData, sp); | 409 | // return base.UpdateAgent(reg, finalDestination, agentData, sp); |
410 | //} | 410 | //} |
411 | 411 | ||
412 | public override void TeleportHome(UUID id, IClientAPI client) | 412 | public virtual void TriggerTeleportHome(UUID id, IClientAPI client) |
413 | { | ||
414 | TeleportHome(id, client); | ||
415 | } | ||
416 | |||
417 | public override bool TeleportHome(UUID id, IClientAPI client) | ||
413 | { | 418 | { |
414 | m_log.DebugFormat( | 419 | m_log.DebugFormat( |
415 | "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId); | 420 | "[ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.Name, client.AgentId); |
@@ -420,8 +425,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
420 | { | 425 | { |
421 | // local grid user | 426 | // local grid user |
422 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: User is local"); | 427 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: User is local"); |
423 | base.TeleportHome(id, client); | 428 | return base.TeleportHome(id, client); |
424 | return; | ||
425 | } | 429 | } |
426 | 430 | ||
427 | // Foreign user wants to go home | 431 | // Foreign user wants to go home |
@@ -431,7 +435,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
431 | { | 435 | { |
432 | client.SendTeleportFailed("Your information has been lost"); | 436 | client.SendTeleportFailed("Your information has been lost"); |
433 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Unable to locate agent's gateway information"); | 437 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Unable to locate agent's gateway information"); |
434 | return; | 438 | return false; |
435 | } | 439 | } |
436 | 440 | ||
437 | IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString()); | 441 | IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString()); |
@@ -441,7 +445,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
441 | { | 445 | { |
442 | client.SendTeleportFailed("Your home region could not be found"); | 446 | client.SendTeleportFailed("Your home region could not be found"); |
443 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent's home region not found"); | 447 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent's home region not found"); |
444 | return; | 448 | return false; |
445 | } | 449 | } |
446 | 450 | ||
447 | ScenePresence sp = ((Scene)(client.Scene)).GetScenePresence(client.AgentId); | 451 | ScenePresence sp = ((Scene)(client.Scene)).GetScenePresence(client.AgentId); |
@@ -449,7 +453,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
449 | { | 453 | { |
450 | client.SendTeleportFailed("Internal error"); | 454 | client.SendTeleportFailed("Internal error"); |
451 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent not found in the scene where it is supposed to be"); | 455 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent not found in the scene where it is supposed to be"); |
452 | return; | 456 | return false; |
453 | } | 457 | } |
454 | 458 | ||
455 | GridRegion homeGatekeeper = MakeRegion(aCircuit); | 459 | GridRegion homeGatekeeper = MakeRegion(aCircuit); |
@@ -460,6 +464,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
460 | DoTeleport( | 464 | DoTeleport( |
461 | sp, homeGatekeeper, finalDestination, | 465 | sp, homeGatekeeper, finalDestination, |
462 | position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); | 466 | position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); |
467 | return true; | ||
463 | } | 468 | } |
464 | 469 | ||
465 | /// <summary> | 470 | /// <summary> |
@@ -586,4 +591,4 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
586 | return region; | 591 | return region; |
587 | } | 592 | } |
588 | } | 593 | } |
589 | } \ No newline at end of file | 594 | } |