aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs
diff options
context:
space:
mode:
authorAdam Frisby2009-04-04 05:51:26 +0000
committerAdam Frisby2009-04-04 05:51:26 +0000
commitfcbe7b9ed63eb4a64a241113421125c3ecf844b8 (patch)
treeba4a6ddd40f1eea9b3e6eda0c2be33c5860064a3 /OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs
parent* Proactively fixed bug-potential concerning the fact that m_httpServer prope... (diff)
downloadopensim-SC_OLD-fcbe7b9ed63eb4a64a241113421125c3ecf844b8.zip
opensim-SC_OLD-fcbe7b9ed63eb4a64a241113421125c3ecf844b8.tar.gz
opensim-SC_OLD-fcbe7b9ed63eb4a64a241113421125c3ecf844b8.tar.bz2
opensim-SC_OLD-fcbe7b9ed63eb4a64a241113421125c3ecf844b8.tar.xz
* Drops Heightmap.Get/Heightmap.Set from IHeightmap interface.
* Adds Heightmap[x,y] to interface. * MRM Scripts should utilize World.Heightmap[x,y] = 0.0; to replace set, and Val = World.Heightmap[x,y] to get.
Diffstat (limited to '')
-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 }