aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces/IGridService.cs
diff options
context:
space:
mode:
authorRobert Adams2015-03-29 14:25:12 -0700
committerRobert Adams2015-03-29 14:25:12 -0700
commit07dead7dcb8b0f2a27a50748e4a460d9669903fc (patch)
treeb61c3d892e83d36fece40e7735c5d97e64b9020f /OpenSim/Services/Interfaces/IGridService.cs
parentvarregion: add varregion and TerrainData use in LLClientView. (diff)
downloadopensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.zip
opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.tar.gz
opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.tar.bz2
opensim-SC-07dead7dcb8b0f2a27a50748e4a460d9669903fc.tar.xz
varregion: any conversions of use of Constants.RegionSize converted into
Util.cs routines to convert region coords to and from world coords or handles.
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 19ea0fe..1119e48 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -179,14 +179,14 @@ namespace OpenSim.Services.Interfaces
179 protected IPEndPoint m_internalEndPoint; 179 protected IPEndPoint m_internalEndPoint;
180 180
181 /// <summary> 181 /// <summary>
182 /// The co-ordinate of this region. 182 /// The co-ordinate of this region in region units.
183 /// </summary> 183 /// </summary>
184 public int RegionCoordX { get { return RegionLocX / (int)Constants.RegionSize; } } 184 public int RegionCoordX { get { return (int)Util.WorldToRegionLoc((uint)RegionLocX); } }
185 185
186 /// <summary> 186 /// <summary>
187 /// The co-ordinate of this region 187 /// The co-ordinate of this region in region units
188 /// </summary> 188 /// </summary>
189 public int RegionCoordY { get { return RegionLocY / (int)Constants.RegionSize; } } 189 public int RegionCoordY { get { return (int)Util.WorldToRegionLoc((uint)RegionLocY); } }
190 190
191 /// <summary> 191 /// <summary>
192 /// The location of this region in meters. 192 /// The location of this region in meters.
@@ -265,8 +265,8 @@ namespace OpenSim.Services.Interfaces
265 265
266 public GridRegion(uint xcell, uint ycell) 266 public GridRegion(uint xcell, uint ycell)
267 { 267 {
268 m_regionLocX = (int)(xcell * Constants.RegionSize); 268 m_regionLocX = (int)Util.RegionToWorldLoc(xcell);
269 m_regionLocY = (int)(ycell * Constants.RegionSize); 269 m_regionLocY = (int)Util.RegionToWorldLoc(ycell);
270 RegionSizeX = (int)Constants.RegionSize; 270 RegionSizeX = (int)Constants.RegionSize;
271 RegionSizeY = (int)Constants.RegionSize; 271 RegionSizeY = (int)Constants.RegionSize;
272 } 272 }
@@ -274,8 +274,8 @@ namespace OpenSim.Services.Interfaces
274 public GridRegion(RegionInfo ConvertFrom) 274 public GridRegion(RegionInfo ConvertFrom)
275 { 275 {
276 m_regionName = ConvertFrom.RegionName; 276 m_regionName = ConvertFrom.RegionName;
277 m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize); 277 m_regionLocX = (int)(ConvertFrom.WorldLocX);
278 m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize); 278 m_regionLocY = (int)(ConvertFrom.WorldLocY);
279 RegionSizeX = (int)ConvertFrom.RegionSizeX; 279 RegionSizeX = (int)ConvertFrom.RegionSizeX;
280 RegionSizeY = (int)ConvertFrom.RegionSizeY; 280 RegionSizeY = (int)ConvertFrom.RegionSizeY;
281 m_internalEndPoint = ConvertFrom.InternalEndPoint; 281 m_internalEndPoint = ConvertFrom.InternalEndPoint;