mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
* 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.
This commit is contained in:
@@ -31,13 +31,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
{
|
||||
public class Heightmap : IHeightmap
|
||||
{
|
||||
private Scene m_scene;
|
||||
private readonly Scene m_scene;
|
||||
|
||||
public Heightmap(Scene scene)
|
||||
{
|
||||
m_scene = scene;
|
||||
}
|
||||
|
||||
public double this[int x, int y]
|
||||
{
|
||||
get { return Get(x, y); }
|
||||
set { Set(x, y, value); }
|
||||
}
|
||||
|
||||
public int Height
|
||||
{
|
||||
get { return m_scene.Heightmap.Height; }
|
||||
@@ -48,12 +54,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
|
||||
get { return m_scene.Heightmap.Width; }
|
||||
}
|
||||
|
||||
public double Get(int x, int y)
|
||||
protected double Get(int x, int y)
|
||||
{
|
||||
return m_scene.Heightmap[x, y];
|
||||
}
|
||||
|
||||
public void Set(int x, int y, double val)
|
||||
protected void Set(int x, int y, double val)
|
||||
{
|
||||
m_scene.Heightmap[x, y] = val;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user