If a user has no home position set, tell them so instead of leaving the request dangling
parent
c8f09f7fcb
commit
463fbb4990
|
@ -549,6 +549,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
|
|
||||||
if (uinfo != null)
|
if (uinfo != null)
|
||||||
{
|
{
|
||||||
|
if (uinfo.HomeRegionID == UUID.Zero)
|
||||||
|
{
|
||||||
|
// can't find the Home region: Tell viewer and abort
|
||||||
|
client.SendTeleportFailed("You don't have a home position set.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
GridRegion regionInfo = m_aScene.GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID);
|
GridRegion regionInfo = m_aScene.GridService.GetRegionByUUID(UUID.Zero, uinfo.HomeRegionID);
|
||||||
if (regionInfo == null)
|
if (regionInfo == null)
|
||||||
{
|
{
|
||||||
|
@ -564,6 +570,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt,
|
client, regionInfo.RegionHandle, uinfo.HomePosition, uinfo.HomeLookAt,
|
||||||
(uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome));
|
(uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaHome));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// can't find the Home region: Tell viewer and abort
|
||||||
|
client.SendTeleportFailed("Your home region could not be found.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in New Issue