aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTom2010-08-04 00:17:02 -0700
committerTom2010-08-04 00:17:02 -0700
commit463fbb4990226661238f1cc30587a5d1e270d44f (patch)
tree3f4302680da37051d7df880e1a4a7e147db53d97
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
downloadopensim-SC_OLD-463fbb4990226661238f1cc30587a5d1e270d44f.zip
opensim-SC_OLD-463fbb4990226661238f1cc30587a5d1e270d44f.tar.gz
opensim-SC_OLD-463fbb4990226661238f1cc30587a5d1e270d44f.tar.bz2
opensim-SC_OLD-463fbb4990226661238f1cc30587a5d1e270d44f.tar.xz
If a user has no home position set, tell them so instead of leaving the request dangling
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 927eeab..1d1a0a1 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -549,6 +549,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
549 549
550 if (uinfo != null) 550 if (uinfo != null)
551 { 551 {
552 if (uinfo.HomeRegionID == UUID.Zero)
553 {
554 // can't find the Home region: Tell viewer and abort
555 client.SendTeleportFailed("You don't have a home position set.");
556 return;
557 }
552 GridRegion regionInfo = m_aScene.GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID); 558 GridRegion regionInfo = m_aScene.GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID);
553 if (regionInfo == null) 559 if (regionInfo == null)
554 { 560 {
@@ -556,7 +562,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
556 client.SendTeleportFailed("Your home region could not be found."); 562 client.SendTeleportFailed("Your home region could not be found.");
557 return; 563 return;
558 } 564 }
559 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})", 565 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})",
560 regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize); 566 regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize);
561 567
562 // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point... 568 // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point...
@@ -564,6 +570,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
564 client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt, 570 client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt,
565 (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome)); 571 (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome));
566 } 572 }
573 else
574 {
575 // can't find the Home region: Tell viewer and abort
576 client.SendTeleportFailed("Your home region could not be found.");
577 return;
578 }
567 } 579 }
568 580
569 #endregion 581 #endregion