From f3afa68a2af6ad5999e6efe3e4725cb17293108d Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 14 Feb 2008 12:16:33 +0000 Subject: * Made new Framework.Constants class, added RegionSize member. * Converted all instances of "256" spotted to use RegionSize instead. Some approximations used for border crossings (ie 255.9f) are still using that value, but should be updated to use something based on RegionSize. * Moving Terrain to a RegionModule, implemented ITerrainChannel and TerrainModule - nonfunctional, but will be soon. --- OpenSim/Grid/UserServer/UserLoginService.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Grid/UserServer') diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index af234e2..09cd9fd 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -82,8 +82,8 @@ namespace OpenSim.Grid.UserServer // Customise the response //CFK: This is redundant and the next message should always appear. //CFK: m_log.Info("[LOGIN]: Home Location"); - response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + - (SimInfo.regionLocY*256).ToString() + "], " + + response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + + (SimInfo.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" + @@ -144,7 +144,7 @@ namespace OpenSim.Grid.UserServer // Send him to default region instead // Load information from the gridserver - ulong defaultHandle = (((ulong) m_config.DefaultX*256) << 32) | ((ulong) m_config.DefaultY*256); + ulong defaultHandle = (((ulong)m_config.DefaultX * Constants.RegionSize) << 32) | ((ulong)m_config.DefaultY * Constants.RegionSize); m_log.Warn( "[LOGIN]: Home region not available: sending to default " + defaultHandle.ToString()); @@ -158,8 +158,8 @@ namespace OpenSim.Grid.UserServer // Customise the response m_log.Info("[LOGIN]: Home Location"); - response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + - (SimInfo.regionLocY*256).ToString() + "], " + + response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * Constants.RegionSize).ToString() + ",r" + + (SimInfo.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" + -- cgit v1.1