aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorAdam Frisby2007-07-02 23:42:38 +0000
committerAdam Frisby2007-07-02 23:42:38 +0000
commit96dfb33bca20c44202a9c0dd6393d78fec53416f (patch)
treea9af1c9218746a568afa4f2b474d53ae493438fa /OpenSim/Region
parent*OGS1 Key2Name/Name2Key works (diff)
downloadopensim-SC-96dfb33bca20c44202a9c0dd6393d78fec53416f.zip
opensim-SC-96dfb33bca20c44202a9c0dd6393d78fec53416f.tar.gz
opensim-SC-96dfb33bca20c44202a9c0dd6393d78fec53416f.tar.bz2
opensim-SC-96dfb33bca20c44202a9c0dd6393d78fec53416f.tar.xz
Attempted workaround for Mono's insistence on compiling BasicTerrain incorrectly
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/ParcelManager.cs4
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs30
2 files changed, 13 insertions, 21 deletions
diff --git a/OpenSim/Region/Environment/ParcelManager.cs b/OpenSim/Region/Environment/ParcelManager.cs
index 1cab4ab..3afbe6e 100644
--- a/OpenSim/Region/Environment/ParcelManager.cs
+++ b/OpenSim/Region/Environment/ParcelManager.cs
@@ -682,8 +682,8 @@ namespace OpenSim.Region.Environment
682 } 682 }
683 } 683 }
684 } 684 }
685 parcelData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), m_world.Terrain[(min_x * 4), (min_y * 4)]); 685 parcelData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_world.Terrain.get((min_x * 4), (min_y * 4)));
686 parcelData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), m_world.Terrain[(max_x * 4), (max_y * 4)]); 686 parcelData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_world.Terrain.get((max_x * 4), (max_y * 4)));
687 parcelData.area = tempArea; 687 parcelData.area = tempArea;
688 } 688 }
689 689
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index 0ad60df..8bd09e3 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -815,6 +815,17 @@ namespace OpenSim.Region.Terrain
815 } 815 }
816 816
817 /// <summary> 817 /// <summary>
818 /// Wrapper to heightmap.get()
819 /// </summary>
820 /// <param name="x">X coord</param>
821 /// <param name="y">Y coord</param>
822 /// <returns>Height at specified coordinates</returns>
823 public double get(int x, int y)
824 {
825 return heightmap.get(x, y);
826 }
827
828 /// <summary>
818 /// Multiplies the heightfield by val 829 /// Multiplies the heightfield by val
819 /// </summary> 830 /// </summary>
820 /// <param name="meep">The heightfield</param> 831 /// <param name="meep">The heightfield</param>
@@ -828,25 +839,6 @@ namespace OpenSim.Region.Terrain
828 } 839 }
829 840
830 /// <summary> 841 /// <summary>
831 /// Returns the height at the coordinates x,y
832 /// </summary>
833 /// <param name="x">X Coordinate</param>
834 /// <param name="y">Y Coordinate</param>
835 /// <returns></returns>
836 public float this[int x, int y]
837 {
838 get
839 {
840 return (float)heightmap.get(x, y);
841 }
842 set
843 {
844 tainted++;
845 heightmap.set(x, y, (double)value);
846 }
847 }
848
849 /// <summary>
850 /// Exports the current heightmap to a PNG file 842 /// Exports the current heightmap to a PNG file
851 /// </summary> 843 /// </summary>
852 /// <param name="filename">The destination filename for the image</param> 844 /// <param name="filename">The destination filename for the image</param>