varregion: remove use of Constants.RegionSize is various places.

More use of the Util routines for conversion of region handles into addresses.
This commit is contained in:
Robert Adams
2015-03-28 07:50:04 -07:00
parent bedafb8fae
commit 08c72a8dc1
5 changed files with 21 additions and 15 deletions

View File

@@ -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);
}
}