diff options
author | Justin Clark-Casey (justincc) | 2009-11-03 19:11:09 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-11-03 19:11:09 +0000 |
commit | af0e5d097480de264e7501e7d5d35328be5640bb (patch) | |
tree | 4ca5cd796ed9618dc9134a6e5eee1f7e7912bee4 /OpenSim/Framework/Communications | |
parent | minor: remove some mono compiler warnings (diff) | |
parent | Fixed a couple of NREs in corner cases. (diff) | |
download | opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.zip opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.tar.gz opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.tar.bz2 opensim-SC_OLD-af0e5d097480de264e7501e7d5d35328be5640bb.tar.xz |
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Services/LoginService.cs | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs index 922cd49..b652299 100644 --- a/OpenSim/Framework/Communications/Services/LoginService.cs +++ b/OpenSim/Framework/Communications/Services/LoginService.cs | |||
@@ -1031,30 +1031,26 @@ namespace OpenSim.Framework.Communications.Services | |||
1031 | return true; | 1031 | return true; |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | // StartLocation not available, send him to a nearby region instead | 1034 | // Get the default region handle |
1035 | // regionInfo = m_gridService.RequestClosestRegion(""); | 1035 | ulong defaultHandle = Utils.UIntsToLong(m_defaultHomeX * Constants.RegionSize, m_defaultHomeY * Constants.RegionSize); |
1036 | //m_log.InfoFormat("[LOGIN]: StartLocation not available sending to region {0}", regionInfo.regionName); | ||
1037 | 1036 | ||
1038 | // Send him to default region instead | 1037 | // If we haven't already tried the default region, reset regionInfo |
1039 | ulong defaultHandle = (((ulong)m_defaultHomeX * Constants.RegionSize) << 32) | | 1038 | if (regionInfo != null && defaultHandle != regionInfo.RegionHandle) |
1040 | ((ulong)m_defaultHomeY * Constants.RegionSize); | 1039 | regionInfo = null; |
1041 | 1040 | ||
1042 | if ((regionInfo != null) && (defaultHandle == regionInfo.RegionHandle)) | 1041 | if (regionInfo == null) |
1043 | { | 1042 | { |
1044 | m_log.ErrorFormat("[LOGIN]: Not trying the default region since this is the same as the selected region"); | 1043 | m_log.Error("[LOGIN]: Sending user to default region " + defaultHandle + " instead"); |
1045 | return false; | 1044 | regionInfo = GetRegionInfo(defaultHandle); |
1046 | } | 1045 | } |
1047 | 1046 | ||
1048 | m_log.Error("[LOGIN]: Sending user to default region " + defaultHandle + " instead"); | ||
1049 | regionInfo = GetRegionInfo(defaultHandle); | ||
1050 | |||
1051 | if (regionInfo == null) | 1047 | if (regionInfo == null) |
1052 | { | 1048 | { |
1053 | m_log.ErrorFormat("[LOGIN]: No default region available. Aborting."); | 1049 | m_log.ErrorFormat("[LOGIN]: Sending user to any region"); |
1054 | return false; | 1050 | regionInfo = RequestClosestRegion(String.Empty); |
1055 | } | 1051 | } |
1056 | 1052 | ||
1057 | theUser.CurrentAgent.Position = new Vector3(128, 128, 0); | 1053 | theUser.CurrentAgent.Position = new Vector3(128f, 128f, 0f); |
1058 | response.StartLocation = "safe"; | 1054 | response.StartLocation = "safe"; |
1059 | 1055 | ||
1060 | return PrepareLoginToRegion(regionInfo, theUser, response, client); | 1056 | return PrepareLoginToRegion(regionInfo, theUser, response, client); |