diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 5c53f78..1ccbcfd 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
86 | 86 | ||
87 | protected override void OnNewClient(IClientAPI client) | 87 | protected override void OnNewClient(IClientAPI client) |
88 | { | 88 | { |
89 | client.OnTeleportHomeRequest += TeleportHome; | 89 | client.OnTeleportHomeRequest += TeleportHomeFired; |
90 | client.OnConnectionClosed += new Action<IClientAPI>(OnConnectionClosed); | 90 | client.OnConnectionClosed += new Action<IClientAPI>(OnConnectionClosed); |
91 | } | 91 | } |
92 | 92 | ||
@@ -178,7 +178,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
178 | return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason); | 178 | return m_aScene.SimulationService.CreateAgent(reg, agentCircuit, teleportFlags, out reason); |
179 | } | 179 | } |
180 | 180 | ||
181 | public override void TeleportHome(UUID id, IClientAPI client) | 181 | public void TeleportHomeFired(UUID id, IClientAPI client) |
182 | { | ||
183 | TeleportHome(id, client); | ||
184 | } | ||
185 | |||
186 | public override bool TeleportHome(UUID id, IClientAPI client) | ||
182 | { | 187 | { |
183 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName); | 188 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Request to teleport {0} {1} home", client.FirstName, client.LastName); |
184 | 189 | ||
@@ -188,8 +193,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
188 | { | 193 | { |
189 | // local grid user | 194 | // local grid user |
190 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: User is local"); | 195 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: User is local"); |
191 | base.TeleportHome(id, client); | 196 | return base.TeleportHome(id, client); |
192 | return; | ||
193 | } | 197 | } |
194 | 198 | ||
195 | // Foreign user wants to go home | 199 | // Foreign user wants to go home |
@@ -199,7 +203,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
199 | { | 203 | { |
200 | client.SendTeleportFailed("Your information has been lost"); | 204 | client.SendTeleportFailed("Your information has been lost"); |
201 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Unable to locate agent's gateway information"); | 205 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Unable to locate agent's gateway information"); |
202 | return; | 206 | return false; |
203 | } | 207 | } |
204 | 208 | ||
205 | IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString()); | 209 | IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString()); |
@@ -209,7 +213,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
209 | { | 213 | { |
210 | client.SendTeleportFailed("Your home region could not be found"); | 214 | client.SendTeleportFailed("Your home region could not be found"); |
211 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent's home region not found"); | 215 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent's home region not found"); |
212 | return; | 216 | return false; |
213 | } | 217 | } |
214 | 218 | ||
215 | ScenePresence sp = ((Scene)(client.Scene)).GetScenePresence(client.AgentId); | 219 | ScenePresence sp = ((Scene)(client.Scene)).GetScenePresence(client.AgentId); |
@@ -217,7 +221,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
217 | { | 221 | { |
218 | client.SendTeleportFailed("Internal error"); | 222 | client.SendTeleportFailed("Internal error"); |
219 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent not found in the scene where it is supposed to be"); | 223 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Agent not found in the scene where it is supposed to be"); |
220 | return; | 224 | return false; |
221 | } | 225 | } |
222 | 226 | ||
223 | IEventQueue eq = sp.Scene.RequestModuleInterface<IEventQueue>(); | 227 | IEventQueue eq = sp.Scene.RequestModuleInterface<IEventQueue>(); |
@@ -227,6 +231,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
227 | aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ExternalHostName, homeGatekeeper.HttpPort, homeGatekeeper.RegionName); | 231 | aCircuit.firstname, aCircuit.lastname, finalDestination.RegionName, homeGatekeeper.ExternalHostName, homeGatekeeper.HttpPort, homeGatekeeper.RegionName); |
228 | 232 | ||
229 | DoTeleport(sp, homeGatekeeper, finalDestination, position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome), eq); | 233 | DoTeleport(sp, homeGatekeeper, finalDestination, position, lookAt, (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome), eq); |
234 | return true; | ||
230 | } | 235 | } |
231 | #endregion | 236 | #endregion |
232 | 237 | ||