aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRobert Adams2013-11-02 15:40:48 -0700
committerRobert Adams2013-11-02 15:40:48 -0700
commit6df7d4219d7a82b0323d9fe294473860c0aef0dd (patch)
tree4206e372d31648b5a491eca1b36382eddd9c6fdb
parentvarregion: Enforce the configuration of square regions in RegionInfo.cs. (diff)
downloadopensim-SC_OLD-6df7d4219d7a82b0323d9fe294473860c0aef0dd.zip
opensim-SC_OLD-6df7d4219d7a82b0323d9fe294473860c0aef0dd.tar.gz
opensim-SC_OLD-6df7d4219d7a82b0323d9fe294473860c0aef0dd.tar.bz2
opensim-SC_OLD-6df7d4219d7a82b0323d9fe294473860c0aef0dd.tar.xz
varregion: add linkage for region size in creations and conversions
of GridRegion. New variables for size and code to initialize same.
-rw-r--r--OpenSim/Services/GridService/GridService.cs4
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs21
2 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index e72b7f9..9fa2dc5 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -441,6 +441,8 @@ namespace OpenSim.Services.GridService
441 RegionData rdata = new RegionData(); 441 RegionData rdata = new RegionData();
442 rdata.posX = (int)rinfo.RegionLocX; 442 rdata.posX = (int)rinfo.RegionLocX;
443 rdata.posY = (int)rinfo.RegionLocY; 443 rdata.posY = (int)rinfo.RegionLocY;
444 rdata.sizeX = rinfo.RegionSizeX;
445 rdata.sizeY = rinfo.RegionSizeY;
444 rdata.RegionID = rinfo.RegionID; 446 rdata.RegionID = rinfo.RegionID;
445 rdata.RegionName = rinfo.RegionName; 447 rdata.RegionName = rinfo.RegionName;
446 rdata.Data = rinfo.ToKeyValuePairs(); 448 rdata.Data = rinfo.ToKeyValuePairs();
@@ -454,6 +456,8 @@ namespace OpenSim.Services.GridService
454 GridRegion rinfo = new GridRegion(rdata.Data); 456 GridRegion rinfo = new GridRegion(rdata.Data);
455 rinfo.RegionLocX = rdata.posX; 457 rinfo.RegionLocX = rdata.posX;
456 rinfo.RegionLocY = rdata.posY; 458 rinfo.RegionLocY = rdata.posY;
459 rinfo.RegionSizeX = rdata.sizeX;
460 rinfo.RegionSizeY = rdata.sizeY;
457 rinfo.RegionID = rdata.RegionID; 461 rinfo.RegionID = rdata.RegionID;
458 rinfo.RegionName = rdata.RegionName; 462 rinfo.RegionName = rdata.RegionName;
459 rinfo.ScopeID = rdata.ScopeID; 463 rinfo.ScopeID = rdata.ScopeID;
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 56171b1..a830f17 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -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
@@ -241,6 +248,8 @@ namespace OpenSim.Services.Interfaces
241 { 248 {
242 m_regionLocX = (int)(xcell * Constants.RegionSize); 249 m_regionLocX = (int)(xcell * Constants.RegionSize);
243 m_regionLocY = (int)(ycell * Constants.RegionSize); 250 m_regionLocY = (int)(ycell * Constants.RegionSize);
251 RegionSizeX = (int)Constants.RegionSize;
252 RegionSizeY = (int)Constants.RegionSize;
244 } 253 }
245 254
246 public GridRegion(RegionInfo ConvertFrom) 255 public GridRegion(RegionInfo ConvertFrom)
@@ -248,6 +257,8 @@ namespace OpenSim.Services.Interfaces
248 m_regionName = ConvertFrom.RegionName; 257 m_regionName = ConvertFrom.RegionName;
249 m_regionLocX = (int)(ConvertFrom.RegionWorldLocX); 258 m_regionLocX = (int)(ConvertFrom.RegionWorldLocX);
250 m_regionLocY = (int)(ConvertFrom.RegionWorldLocY); 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