From 96dfb33bca20c44202a9c0dd6393d78fec53416f Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 2 Jul 2007 23:42:38 +0000 Subject: Attempted workaround for Mono's insistence on compiling BasicTerrain incorrectly --- OpenSim/Region/Environment/ParcelManager.cs | 4 +-- .../Region/Terrain.BasicTerrain/TerrainEngine.cs | 30 ++++++++-------------- 2 files changed, 13 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region') 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 } } } - parcelData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), m_world.Terrain[(min_x * 4), (min_y * 4)]); - parcelData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), m_world.Terrain[(max_x * 4), (max_y * 4)]); + parcelData.AABBMin = new LLVector3((float)(min_x * 4), (float)(min_y * 4), (float)m_world.Terrain.get((min_x * 4), (min_y * 4))); + parcelData.AABBMax = new LLVector3((float)(max_x * 4), (float)(max_y * 4), (float)m_world.Terrain.get((max_x * 4), (max_y * 4))); parcelData.area = tempArea; } 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 } /// + /// Wrapper to heightmap.get() + /// + /// X coord + /// Y coord + /// Height at specified coordinates + public double get(int x, int y) + { + return heightmap.get(x, y); + } + + /// /// Multiplies the heightfield by val /// /// The heightfield @@ -828,25 +839,6 @@ namespace OpenSim.Region.Terrain } /// - /// Returns the height at the coordinates x,y - /// - /// X Coordinate - /// Y Coordinate - /// - public float this[int x, int y] - { - get - { - return (float)heightmap.get(x, y); - } - set - { - tainted++; - heightmap.set(x, y, (double)value); - } - } - - /// /// Exports the current heightmap to a PNG file /// /// The destination filename for the image -- cgit v1.1