aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/LandManagement
diff options
context:
space:
mode:
authorAdam Frisby2008-02-14 12:16:33 +0000
committerAdam Frisby2008-02-14 12:16:33 +0000
commitf3afa68a2af6ad5999e6efe3e4725cb17293108d (patch)
tree4253a44bee39976d6b3dd6813439f5966cf12632 /OpenSim/Region/Environment/LandManagement
parent* Exposed AddHandlers in response to mantis #534. Thanks, kmeisthax! (diff)
downloadopensim-SC_OLD-f3afa68a2af6ad5999e6efe3e4725cb17293108d.zip
opensim-SC_OLD-f3afa68a2af6ad5999e6efe3e4725cb17293108d.tar.gz
opensim-SC_OLD-f3afa68a2af6ad5999e6efe3e4725cb17293108d.tar.bz2
opensim-SC_OLD-f3afa68a2af6ad5999e6efe3e4725cb17293108d.tar.xz
* Made new Framework.Constants class, added RegionSize member.
* Converted all instances of "256" spotted to use RegionSize instead. Some approximations used for border crossings (ie 255.9f) are still using that value, but should be updated to use something based on RegionSize. * Moving Terrain to a RegionModule, implemented ITerrainChannel and TerrainModule - nonfunctional, but will be soon.
Diffstat (limited to 'OpenSim/Region/Environment/LandManagement')
-rw-r--r--OpenSim/Region/Environment/LandManagement/Land.cs4
-rw-r--r--OpenSim/Region/Environment/LandManagement/LandManager.cs4
2 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs
index 7cc8519..fec8899 100644
--- a/OpenSim/Region/Environment/LandManagement/Land.cs
+++ b/OpenSim/Region/Environment/LandManagement/Land.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment.LandManagement
78 /// <returns>Returns true if the piece of land contains the specified point</returns> 78 /// <returns>Returns true if the piece of land contains the specified point</returns>
79 public bool containsPoint(int x, int y) 79 public bool containsPoint(int x, int y)
80 { 80 {
81 if (x >= 0 && y >= 0 && x <= 256 && x <= 256) 81 if (x >= 0 && y >= 0 && x <= Constants.RegionSize && x <= Constants.RegionSize)
82 { 82 {
83 return (landBitmap[x/4, y/4] == true); 83 return (landBitmap[x/4, y/4] == true);
84 } 84 }
@@ -545,7 +545,7 @@ namespace OpenSim.Region.Environment.LandManagement
545 /// <returns></returns> 545 /// <returns></returns>
546 public static bool[,] basicFullRegionLandBitmap() 546 public static bool[,] basicFullRegionLandBitmap()
547 { 547 {
548 return getSquareLandBitmap(0, 0, 256, 256); 548 return getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize);
549 } 549 }
550 550
551 /// <summary> 551 /// <summary>
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs
index a4d8868..f5e2a3e 100644
--- a/OpenSim/Region/Environment/LandManagement/LandManager.cs
+++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs
@@ -281,7 +281,7 @@ namespace OpenSim.Region.Environment.LandManagement
281 281
282 public Land getLandObject(int x, int y) 282 public Land getLandObject(int x, int y)
283 { 283 {
284 if (x >= 256 || y >= 256 || x < 0 || y < 0) 284 if (x >= Constants.RegionSize || y >= Constants.RegionSize || x < 0 || y < 0)
285 { 285 {
286 // These exceptions here will cause a lot of complaints from the users specifically because 286 // These exceptions here will cause a lot of complaints from the users specifically because
287 // they happen every time at border crossings 287 // they happen every time at border crossings
@@ -614,7 +614,7 @@ namespace OpenSim.Region.Environment.LandManagement
614 614
615 Land fullSimParcel = new Land(LLUUID.Zero, false, m_scene); 615 Land fullSimParcel = new Land(LLUUID.Zero, false, m_scene);
616 616
617 fullSimParcel.setLandBitmap(Land.getSquareLandBitmap(0, 0, 256, 256)); 617 fullSimParcel.setLandBitmap(Land.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
618 fullSimParcel.landData.ownerID = m_regInfo.MasterAvatarAssignedUUID; 618 fullSimParcel.landData.ownerID = m_regInfo.MasterAvatarAssignedUUID;
619 619
620 addLandObject(fullSimParcel); 620 addLandObject(fullSimParcel);