aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces/IGridService.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/Services/Interfaces/IGridService.cs
parentvarregion: Massive work to LandManagementModule and LandObject to (diff)
downloadopensim-SC_OLD-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.zip
opensim-SC_OLD-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.tar.gz
opensim-SC_OLD-beeec1c46726a266edf5c8260f9cf4e4e6f91c8a.tar.bz2
opensim-SC_OLD-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 'OpenSim/Services/Interfaces/IGridService.cs')
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index a830f17..e1a3cef 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -168,12 +168,12 @@ namespace OpenSim.Services.Interfaces
168 /// <summary> 168 /// <summary>
169 /// The co-ordinate of this region. 169 /// The co-ordinate of this region.
170 /// </summary> 170 /// </summary>
171 public int RegionCoordX { get { return RegionLocX / (int)Constants.RegionSize; } } 171 public int RegionCoordX { get { return (int)Util.WorldToRegionLoc((uint)RegionLocX); } }
172 172
173 /// <summary> 173 /// <summary>
174 /// The co-ordinate of this region 174 /// The co-ordinate of this region
175 /// </summary> 175 /// </summary>
176 public int RegionCoordY { get { return RegionLocY / (int)Constants.RegionSize; } } 176 public int RegionCoordY { get { return (int)Util.WorldToRegionLoc((uint)RegionLocY); } }
177 177
178 /// <summary> 178 /// <summary>
179 /// The location of this region in meters. 179 /// The location of this region in meters.
@@ -246,8 +246,8 @@ namespace OpenSim.Services.Interfaces
246 246
247 public GridRegion(uint xcell, uint ycell) 247 public GridRegion(uint xcell, uint ycell)
248 { 248 {
249 m_regionLocX = (int)(xcell * Constants.RegionSize); 249 m_regionLocX = (int)Util.RegionToWorldLoc(xcell);
250 m_regionLocY = (int)(ycell * Constants.RegionSize); 250 m_regionLocY = (int)Util.RegionToWorldLoc(ycell);
251 RegionSizeX = (int)Constants.RegionSize; 251 RegionSizeX = (int)Constants.RegionSize;
252 RegionSizeY = (int)Constants.RegionSize; 252 RegionSizeY = (int)Constants.RegionSize;
253 } 253 }