From 08c72a8dc1e54114559521a6c2952905ecf6f105 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 28 Mar 2015 07:50:04 -0700 Subject: varregion: remove use of Constants.RegionSize is various places. More use of the Util routines for conversion of region handles into addresses. --- OpenSim/Framework/UserProfileData.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/UserProfileData.cs') diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs index 9bac739..f7069a5 100644 --- a/OpenSim/Framework/UserProfileData.cs +++ b/OpenSim/Framework/UserProfileData.cs @@ -161,14 +161,18 @@ namespace OpenSim.Framework { get { - return Utils.UIntsToLong( - m_homeRegionX * (uint)Constants.RegionSize, m_homeRegionY * (uint)Constants.RegionSize); + return Util.RegionWorldLocToHandle(Util.RegionToWorldLoc(m_homeRegionX), Util.RegionToWorldLoc(m_homeRegionY)); + // return Utils.UIntsToLong( m_homeRegionX * (uint)Constants.RegionSize, m_homeRegionY * (uint)Constants.RegionSize); } set { - m_homeRegionX = (uint) (value >> 40); - m_homeRegionY = (((uint) (value)) >> 8); + uint regionWorldLocX, regionWorldLocY; + Util.RegionHandleToWorldLoc(value, out regionWorldLocX, out regionWorldLocY); + m_homeRegionX = Util.WorldToRegionLoc(regionWorldLocX); + m_homeRegionY = Util.WorldToRegionLoc(regionWorldLocY); + // m_homeRegionX = (uint) (value >> 40); + // m_homeRegionY = (((uint) (value)) >> 8); } } -- cgit v1.1