aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/UserProfileData.cs
diff options
context:
space:
mode:
authorRobert Adams2013-11-08 20:53:37 -0800
committerRobert Adams2013-11-08 20:53:37 -0800
commitbeeec1c46726a266edf5c8260f9cf4e4e6f91c8a (patch)
treeac749f4db4d4ee640bf9091b9684d2a36eedb284 /OpenSim/Framework/UserProfileData.cs
parentvarregion: Massive work to LandManagementModule and LandObject to (diff)
downloadopensim-SC-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.zip
opensim-SC-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.tar.gz
opensim-SC-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.tar.bz2
opensim-SC-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/UserProfileData.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs
index 9bac739..266ccf0 100644
--- a/OpenSim/Framework/UserProfileData.cs
+++ b/OpenSim/Framework/UserProfileData.cs
@@ -160,15 +160,19 @@ namespace OpenSim.Framework
160 public virtual ulong HomeRegion 160 public virtual ulong HomeRegion
161 { 161 {
162 get 162 get
163 { 163 {
164 return Utils.UIntsToLong( 164 return Util.RegionWorldLocToHandle(Util.RegionToWorldLoc(m_homeRegionX), Util.RegionToWorldLoc(m_homeRegionY));
165 m_homeRegionX * (uint)Constants.RegionSize, m_homeRegionY * (uint)Constants.RegionSize); 165 // return Utils.UIntsToLong( m_homeRegionX * (uint)Constants.RegionSize, m_homeRegionY * (uint)Constants.RegionSize);
166 } 166 }
167 167
168 set 168 set
169 { 169 {
170 m_homeRegionX = (uint) (value >> 40); 170 uint regionWorldLocX, regionWorldLocY;
171 m_homeRegionY = (((uint) (value)) >> 8); 171 Util.RegionHandleToWorldLoc(value, out regionWorldLocX, out regionWorldLocY);
172 m_homeRegionX = Util.WorldToRegionLoc(regionWorldLocX);
173 m_homeRegionY = Util.WorldToRegionLoc(regionWorldLocY);
174 // m_homeRegionX = (uint) (value >> 40);
175 // m_homeRegionY = (((uint) (value)) >> 8);
172 } 176 }
173 } 177 }
174 178