aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Interfaces')
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs33
1 files changed, 27 insertions, 6 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 88ac5b3..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.
@@ -185,6 +185,9 @@ namespace OpenSim.Services.Interfaces
185 } 185 }
186 protected int m_regionLocX; 186 protected int m_regionLocX;
187 187
188 public int RegionSizeX { get; set; }
189 public int RegionSizeY { get; set; }
190
188 /// <summary> 191 /// <summary>
189 /// The location of this region in meters. 192 /// The location of this region in meters.
190 /// </summary> 193 /// </summary>
@@ -222,6 +225,8 @@ namespace OpenSim.Services.Interfaces
222 { 225 {
223 m_regionLocX = regionLocX; 226 m_regionLocX = regionLocX;
224 m_regionLocY = regionLocY; 227 m_regionLocY = regionLocY;
228 RegionSizeX = (int)Constants.RegionSize;
229 RegionSizeY = (int)Constants.RegionSize;
225 230
226 m_internalEndPoint = internalEndPoint; 231 m_internalEndPoint = internalEndPoint;
227 m_externalHostName = externalUri; 232 m_externalHostName = externalUri;
@@ -231,6 +236,8 @@ namespace OpenSim.Services.Interfaces
231 { 236 {
232 m_regionLocX = regionLocX; 237 m_regionLocX = regionLocX;
233 m_regionLocY = regionLocY; 238 m_regionLocY = regionLocY;
239 RegionSizeX = (int)Constants.RegionSize;
240 RegionSizeY = (int)Constants.RegionSize;
234 241
235 m_externalHostName = externalUri; 242 m_externalHostName = externalUri;
236 243
@@ -239,15 +246,19 @@ namespace OpenSim.Services.Interfaces
239 246
240 public GridRegion(uint xcell, uint ycell) 247 public GridRegion(uint xcell, uint ycell)
241 { 248 {
242 m_regionLocX = (int)(xcell * Constants.RegionSize); 249 m_regionLocX = (int)Util.RegionToWorldLoc(xcell);
243 m_regionLocY = (int)(ycell * Constants.RegionSize); 250 m_regionLocY = (int)Util.RegionToWorldLoc(ycell);
251 RegionSizeX = (int)Constants.RegionSize;
252 RegionSizeY = (int)Constants.RegionSize;
244 } 253 }
245 254
246 public GridRegion(RegionInfo ConvertFrom) 255 public GridRegion(RegionInfo ConvertFrom)
247 { 256 {
248 m_regionName = ConvertFrom.RegionName; 257 m_regionName = ConvertFrom.RegionName;
249 m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize); 258 m_regionLocX = (int)(ConvertFrom.RegionWorldLocX);
250 m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize); 259 m_regionLocY = (int)(ConvertFrom.RegionWorldLocY);
260 RegionSizeX = (int)ConvertFrom.RegionSizeX;
261 RegionSizeY = (int)ConvertFrom.RegionSizeY;
251 m_internalEndPoint = ConvertFrom.InternalEndPoint; 262 m_internalEndPoint = ConvertFrom.InternalEndPoint;
252 m_externalHostName = ConvertFrom.ExternalHostName; 263 m_externalHostName = ConvertFrom.ExternalHostName;
253 m_httpPort = ConvertFrom.HttpPort; 264 m_httpPort = ConvertFrom.HttpPort;
@@ -266,6 +277,8 @@ namespace OpenSim.Services.Interfaces
266 m_regionName = ConvertFrom.RegionName; 277 m_regionName = ConvertFrom.RegionName;
267 m_regionLocX = ConvertFrom.RegionLocX; 278 m_regionLocX = ConvertFrom.RegionLocX;
268 m_regionLocY = ConvertFrom.RegionLocY; 279 m_regionLocY = ConvertFrom.RegionLocY;
280 RegionSizeX = ConvertFrom.RegionSizeX;
281 RegionSizeY = ConvertFrom.RegionSizeY;
269 m_internalEndPoint = ConvertFrom.InternalEndPoint; 282 m_internalEndPoint = ConvertFrom.InternalEndPoint;
270 m_externalHostName = ConvertFrom.ExternalHostName; 283 m_externalHostName = ConvertFrom.ExternalHostName;
271 m_httpPort = ConvertFrom.HttpPort; 284 m_httpPort = ConvertFrom.HttpPort;
@@ -373,6 +386,8 @@ namespace OpenSim.Services.Interfaces
373 kvp["uuid"] = RegionID.ToString(); 386 kvp["uuid"] = RegionID.ToString();
374 kvp["locX"] = RegionLocX.ToString(); 387 kvp["locX"] = RegionLocX.ToString();
375 kvp["locY"] = RegionLocY.ToString(); 388 kvp["locY"] = RegionLocY.ToString();
389 kvp["sizeX"] = RegionSizeX.ToString();
390 kvp["sizeY"] = RegionSizeY.ToString();
376 kvp["regionName"] = RegionName; 391 kvp["regionName"] = RegionName;
377 kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString(); 392 kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString();
378 kvp["serverHttpPort"] = HttpPort.ToString(); 393 kvp["serverHttpPort"] = HttpPort.ToString();
@@ -399,6 +414,12 @@ namespace OpenSim.Services.Interfaces
399 if (kvp.ContainsKey("locY")) 414 if (kvp.ContainsKey("locY"))
400 RegionLocY = Convert.ToInt32((string)kvp["locY"]); 415 RegionLocY = Convert.ToInt32((string)kvp["locY"]);
401 416
417 if (kvp.ContainsKey("sizeX"))
418 RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]);
419
420 if (kvp.ContainsKey("sizeY"))
421 RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]);
422
402 if (kvp.ContainsKey("regionName")) 423 if (kvp.ContainsKey("regionName"))
403 RegionName = (string)kvp["regionName"]; 424 RegionName = (string)kvp["regionName"];
404 425