aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
diff options
context:
space:
mode:
authorMelanie2013-05-07 00:31:11 +0100
committerMelanie2013-05-07 00:31:11 +0100
commit4c83b5e719ad288b1250fbed3f74698fa34eff21 (patch)
tree31eb880c4cf00b0697b07fd7f392ad374a11d1db /OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs
parentBulletSim: apply linear and angular friction in vehicle coordinates (diff)
downloadopensim-SC_OLD-4c83b5e719ad288b1250fbed3f74698fa34eff21.zip
opensim-SC_OLD-4c83b5e719ad288b1250fbed3f74698fa34eff21.tar.gz
opensim-SC_OLD-4c83b5e719ad288b1250fbed3f74698fa34eff21.tar.bz2
opensim-SC_OLD-4c83b5e719ad288b1250fbed3f74698fa34eff21.tar.xz
Step one of estate settings sharing - port the Avination Estate module (complete module) as changes are too extensive to apply manually
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs21
1 files changed, 13 insertions, 8 deletions
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}