aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
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/Scenes
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 '')
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainChannel.cs9
1 files changed, 3 insertions, 6 deletions
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 }