aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-28 14:13:17 -0700
committerJohn Hurliman2009-10-28 14:13:17 -0700
commitb81c829576dd916c0a7bf141919f5e13f025d818 (patch)
tree92e537b80a4cded51d1cccd2a3ba4dfb12c1665c /OpenSim/Framework/Communications
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-b81c829576dd916c0a7bf141919f5e13f025d818.zip
opensim-SC_OLD-b81c829576dd916c0a7bf141919f5e13f025d818.tar.gz
opensim-SC_OLD-b81c829576dd916c0a7bf141919f5e13f025d818.tar.bz2
opensim-SC_OLD-b81c829576dd916c0a7bf141919f5e13f025d818.tar.xz
* Standalone logins will now go through the sequence of "requested region, default region, any region" before giving up
* Hip offset should have been added not subtracted (it's a negative offset). This puts avatar feet closer to the ground * Improved duplicate checking for terse updates. This should reduce bandwidth and walking through walls
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Services/LoginService.cs26
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);