aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2019-11-12 18:19:12 +0000
committerUbitUmarov2019-11-12 18:19:12 +0000
commitd10f11d31064f8d6fd6bccaf907897e07cd63cef (patch)
tree3636457b544b77f56dd175925cc6382429b5087d /OpenSim/Region/Framework
parentmore changes on terrain edit. Silent ignore comand if busy (large area smoot... (diff)
downloadopensim-SC-d10f11d31064f8d6fd6bccaf907897e07cd63cef.zip
opensim-SC-d10f11d31064f8d6fd6bccaf907897e07cd63cef.tar.gz
opensim-SC-d10f11d31064f8d6fd6bccaf907897e07cd63cef.tar.bz2
opensim-SC-d10f11d31064f8d6fd6bccaf907897e07cd63cef.tar.xz
terrain replace double by float
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainChannel.cs9
2 files changed, 4 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs b/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs
index 78db02a..9e1fa5b 100644
--- a/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs
+++ b/OpenSim/Region/Framework/Interfaces/ITerrainChannel.cs
@@ -36,7 +36,7 @@ namespace OpenSim.Region.Framework.Interfaces
36 int Height { get;} // Y dimension 36 int Height { get;} // Y dimension
37 int Altitude { get;} // Z dimension 37 int Altitude { get;} // Z dimension
38 38
39 double this[int x, int y] { get; set; } 39 float this[int x, int y] { get; set; }
40 40
41 float GetHeightAtXYZ(float x, float y, float z); 41 float GetHeightAtXYZ(float x, float y, float z);
42 42
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
index 28bbdda..2d959cc 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
@@ -119,10 +119,7 @@ namespace OpenSim.Region.Framework.Scenes
119 return m_terrainData; 119 return m_terrainData;
120 } 120 }
121 121
122 // ITerrainChannel.GetFloatsSerialized()
123 // This one dimensional version is ordered so height = map[y*sizeX+x]; 122 // This one dimensional version is ordered so height = map[y*sizeX+x];
124 // DEPRECATED: don't use this function as it does not retain the dimensions of the terrain
125 // and the caller will probably do the wrong thing if the terrain is not the legacy 256x256.
126 public float[] GetFloatsSerialised() 123 public float[] GetFloatsSerialised()
127 { 124 {
128 return m_terrainData.GetFloatsSerialized(); 125 return m_terrainData.GetFloatsSerialized();
@@ -147,12 +144,12 @@ namespace OpenSim.Region.Framework.Scenes
147 } 144 }
148 145
149 // ITerrainChannel.this[x,y] 146 // ITerrainChannel.this[x,y]
150 public double this[int x, int y] 147 public float this[int x, int y]
151 { 148 {
152 get { 149 get {
153 if (x < 0 || x >= Width || y < 0 || y >= Height) 150 if (x < 0 || x >= Width || y < 0 || y >= Height)
154 return 0; 151 return 0;
155 return (double)m_terrainData[x, y]; 152 return m_terrainData[x, y];
156 } 153 }
157 set 154 set
158 { 155 {
@@ -492,7 +489,7 @@ namespace OpenSim.Region.Framework.Scenes
492 float value; 489 float value;
493 value = BitConverter.ToSingle(dataArray, index); 490 value = BitConverter.ToSingle(dataArray, index);
494 index += 4; 491 index += 4;
495 this[x, y] = (double)value; 492 this[x, y] = value;
496 } 493 }
497 } 494 }
498 } 495 }