aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSignpostMarv2012-09-06 10:54:45 +0100
committerJustin Clark-Casey (justincc)2012-09-08 00:14:39 +0100
commit874bde366aa3f834957f757aa56a7634becb4415 (patch)
tree159683757c1bbddaf646981fb4191336f28037fa /OpenSim
parentrenaming to markdown file (diff)
downloadopensim-SC_OLD-874bde366aa3f834957f757aa56a7634becb4415.zip
opensim-SC_OLD-874bde366aa3f834957f757aa56a7634becb4415.tar.gz
opensim-SC_OLD-874bde366aa3f834957f757aa56a7634becb4415.tar.bz2
opensim-SC_OLD-874bde366aa3f834957f757aa56a7634becb4415.tar.xz
4096 is used in various places as the maximum height of a region, refactoring to be a constant
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Constants.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs4
3 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs
index 1b1aaf2..a2eb5ee 100644
--- a/OpenSim/Framework/Constants.cs
+++ b/OpenSim/Framework/Constants.cs
@@ -31,6 +31,7 @@ namespace OpenSim.Framework
31 public class Constants 31 public class Constants
32 { 32 {
33 public const uint RegionSize = 256; 33 public const uint RegionSize = 256;
34 public const uint RegionHeight = 4096;
34 public const byte TerrainPatchSize = 16; 35 public const byte TerrainPatchSize = 16;
35 public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f"; 36 public const string DefaultTexture = "89556747-24cb-43ed-920b-47caed15465f";
36 37
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index be22cb4..83c9739 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1948,7 +1948,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1948 pos.x > (Constants.RegionSize + 10) || // return FALSE if more than 10 meters into a east-adjacent region. 1948 pos.x > (Constants.RegionSize + 10) || // return FALSE if more than 10 meters into a east-adjacent region.
1949 pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region. 1949 pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region.
1950 pos.y > (Constants.RegionSize + 10) || // return FALSE if more than 10 meters into a north-adjacent region. 1950 pos.y > (Constants.RegionSize + 10) || // return FALSE if more than 10 meters into a north-adjacent region.
1951 pos.z > 4096 // return FALSE if altitude than 4096m 1951 pos.z > Constants.RegionHeight // return FALSE if altitude than 4096m
1952 ) 1952 )
1953 ) 1953 )
1954 { 1954 {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
index 67a65ff..35cb408 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
101 public string RegisterRegion(UUID scopeID, GridRegion regionInfo) 101 public string RegisterRegion(UUID scopeID, GridRegion regionInfo)
102 { 102 {
103 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); 103 Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0);
104 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, 4096.0); 104 Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight);
105 105
106 OSDMap extraData = new OSDMap 106 OSDMap extraData = new OSDMap
107 { 107 {
@@ -286,7 +286,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
286 List<GridRegion> foundRegions = new List<GridRegion>(); 286 List<GridRegion> foundRegions = new List<GridRegion>();
287 287
288 Vector3d minPosition = new Vector3d(xmin, ymin, 0.0); 288 Vector3d minPosition = new Vector3d(xmin, ymin, 0.0);
289 Vector3d maxPosition = new Vector3d(xmax, ymax, 4096.0); 289 Vector3d maxPosition = new Vector3d(xmax, ymax, Constants.RegionHeight);
290 290
291 NameValueCollection requestArgs = new NameValueCollection 291 NameValueCollection requestArgs = new NameValueCollection
292 { 292 {