diff options
author | Justin Clark-Casey (justincc) | 2012-05-01 17:52:30 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-01 17:52:30 +0100 |
commit | 37dd174697c0bcc201f8d8e4d7569c2a51f53757 (patch) | |
tree | 7d4b0edd973bbefac317b00e75c9c991baab2904 /OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |
parent | Create TestHelpers.EnableLogging() and DisableLogging() to turn logging on an... (diff) | |
download | opensim-SC_OLD-37dd174697c0bcc201f8d8e4d7569c2a51f53757.zip opensim-SC_OLD-37dd174697c0bcc201f8d8e4d7569c2a51f53757.tar.gz opensim-SC_OLD-37dd174697c0bcc201f8d8e4d7569c2a51f53757.tar.bz2 opensim-SC_OLD-37dd174697c0bcc201f8d8e4d7569c2a51f53757.tar.xz |
refactor: Split most of EntityTransferModule.Teleport() into its same region and different region teleport components.
DoTeleport() now retrives IEventQueue itself rather than requiring it to be passed in.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 488bbcb..b578bcb 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -242,13 +242,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
242 | return; | 242 | return; |
243 | } | 243 | } |
244 | 244 | ||
245 | IEventQueue eq = sp.Scene.RequestModuleInterface<IEventQueue>(); | ||
246 | GridRegion homeGatekeeper = MakeRegion(aCircuit); | 245 | GridRegion homeGatekeeper = MakeRegion(aCircuit); |
247 | 246 | ||
248 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}", | 247 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: teleporting user {0} {1} home to {2} via {3}:{4}", |
249 | aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName); | 248 | aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ServerURI, homeGatekeeper.RegionName); |
250 | 249 | ||
251 | DoTeleport(sp, homeGatekeeper, finalDestination, position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome), eq); | 250 | DoTeleport( |
251 | sp, homeGatekeeper, finalDestination, | ||
252 | position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); | ||
252 | } | 253 | } |
253 | 254 | ||
254 | /// <summary> | 255 | /// <summary> |
@@ -288,17 +289,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
288 | { | 289 | { |
289 | ScenePresence sp = scene.GetScenePresence(remoteClient.AgentId); | 290 | ScenePresence sp = scene.GetScenePresence(remoteClient.AgentId); |
290 | IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>(); | 291 | IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>(); |
291 | IEventQueue eq = sp.Scene.RequestModuleInterface<IEventQueue>(); | 292 | |
292 | if (transferMod != null && sp != null && eq != null) | 293 | if (transferMod != null && sp != null) |
293 | transferMod.DoTeleport(sp, gatekeeper, finalDestination, lm.Position, | 294 | transferMod.DoTeleport( |
294 | Vector3.UnitX, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark), eq); | 295 | sp, gatekeeper, finalDestination, lm.Position, Vector3.UnitX, |
296 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); | ||
295 | } | 297 | } |
296 | 298 | ||
297 | } | 299 | } |
298 | 300 | ||
299 | // can't find the region: Tell viewer and abort | 301 | // can't find the region: Tell viewer and abort |
300 | remoteClient.SendTeleportFailed("The teleport destination could not be found."); | 302 | remoteClient.SendTeleportFailed("The teleport destination could not be found."); |
301 | |||
302 | } | 303 | } |
303 | 304 | ||
304 | #endregion | 305 | #endregion |