mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
varregion: elimination of Constants.RegionSize from all over OpenSimulator.
Routines in Util to compute region world coordinates from region coordinates as well as the conversion to and from region handles. These routines have replaced a lot of math scattered throughout the simulator. Should be no functional changes.
This commit is contained in:
@@ -160,15 +160,19 @@ namespace OpenSim.Framework
|
||||
public virtual ulong HomeRegion
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user