* 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.
0.6.0-stable
Teravus Ovares 2008-08-26 03:07:24 +00:00
parent 4aa204c8ea
commit 9f635e354b
1 changed files with 30 additions and 12 deletions

View File

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