aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs
index 2f6c204..875de50 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs
@@ -31,13 +31,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
31{ 31{
32 public class Heightmap : IHeightmap 32 public class Heightmap : IHeightmap
33 { 33 {
34 private Scene m_scene; 34 private readonly Scene m_scene;
35 35
36 public Heightmap(Scene scene) 36 public Heightmap(Scene scene)
37 { 37 {
38 m_scene = scene; 38 m_scene = scene;
39 } 39 }
40 40
41 public double this[int x, int y]
42 {
43 get { return Get(x, y); }
44 set { Set(x, y, value); }
45 }
46
41 public int Height 47 public int Height
42 { 48 {
43 get { return m_scene.Heightmap.Height; } 49 get { return m_scene.Heightmap.Height; }
@@ -48,12 +54,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
48 get { return m_scene.Heightmap.Width; } 54 get { return m_scene.Heightmap.Width; }
49 } 55 }
50 56
51 public double Get(int x, int y) 57 protected double Get(int x, int y)
52 { 58 {
53 return m_scene.Heightmap[x, y]; 59 return m_scene.Heightmap[x, y];
54 } 60 }
55 61
56 public void Set(int x, int y, double val) 62 protected void Set(int x, int y, double val)
57 { 63 {
58 m_scene.Heightmap[x, y] = val; 64 m_scene.Heightmap[x, y] = val;
59 } 65 }