* Fixed a bug that occurred if your home region wasn't logged in, in standalone. It wouldn't let you in even if your destination region is online with a 'region x not found' message.

* The purpose of the check was to ensure that your home region was sent to your client properly when you connected.    However, the desired result is that if the home region is down, but the destination region is online, the user should still get in.
* Changes: if the home region isn't available, set the message to the client so that the home region is the destination region.
This commit is contained in:
Teravus Ovares
2008-08-26 03:07:24 +00:00
parent 4aa204c8ea
commit 9f635e354b

View File

@@ -183,19 +183,37 @@ namespace OpenSim.Region.Communications.Local
RegionInfo homeReg = m_Parent.GridService.RequestNeighbourInfo(theUser.HomeRegion);
RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion);
if ((homeReg != null) && (reg != null))
if ((homeReg != null) || (reg != null))
{
response.Home = "{'region_handle':[r" +
(homeReg.RegionLocX * Constants.RegionSize).ToString() + ",r" +
(homeReg.RegionLocY * Constants.RegionSize).ToString() + "], " +
"'position':[r" +
theUser.HomeLocation.X.ToString() + ",r" +
theUser.HomeLocation.Y.ToString() + ",r" +
theUser.HomeLocation.Z.ToString() + "], " +
"'look_at':[r" +
theUser.HomeLocation.X.ToString() + ",r" +
theUser.HomeLocation.Y.ToString() + ",r" +
theUser.HomeLocation.Z.ToString() + "]}";
if (homeReg != null)
{
response.Home = "{'region_handle':[r" +
(homeReg.RegionLocX * Constants.RegionSize).ToString() + ",r" +
(homeReg.RegionLocY * Constants.RegionSize).ToString() + "], " +
"'position':[r" +
theUser.HomeLocation.X.ToString() + ",r" +
theUser.HomeLocation.Y.ToString() + ",r" +
theUser.HomeLocation.Z.ToString() + "], " +
"'look_at':[r" +
theUser.HomeLocation.X.ToString() + ",r" +
theUser.HomeLocation.Y.ToString() + ",r" +
theUser.HomeLocation.Z.ToString() + "]}";
}
else
{
m_log.Warn("[LOGIN]: Your home region doesn't exist");
response.Home = "{'region_handle':[r" +
(reg.RegionLocX * Constants.RegionSize).ToString() + ",r" +
(reg.RegionLocY * Constants.RegionSize).ToString() + "], " +
"'position':[r" +
theUser.HomeLocation.X.ToString() + ",r" +
theUser.HomeLocation.Y.ToString() + ",r" +
theUser.HomeLocation.Z.ToString() + "], " +
"'look_at':[r" +
theUser.HomeLocation.X.ToString() + ",r" +
theUser.HomeLocation.Y.ToString() + ",r" +
theUser.HomeLocation.Z.ToString() + "]}";
}
string capsPath = Util.GetRandomCapsPath();
response.SimAddress = reg.ExternalEndPoint.Address.ToString();
response.SimPort = (uint) reg.ExternalEndPoint.Port;