diff options
author | Tedd Hansen | 2008-01-16 21:21:31 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-01-16 21:21:31 +0000 |
commit | 7fa6646d6f75585d6ad3bd2a7c1c0e873e2fc2a6 (patch) | |
tree | d2c5a51cdaad5db0306120416e763dffbfdaef3d /OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs | |
parent | * Fix mantis 345 - it is now possible to duplicate prims directly in the regi... (diff) | |
download | opensim-SC_OLD-7fa6646d6f75585d6ad3bd2a7c1c0e873e2fc2a6.zip opensim-SC_OLD-7fa6646d6f75585d6ad3bd2a7c1c0e873e2fc2a6.tar.gz opensim-SC_OLD-7fa6646d6f75585d6ad3bd2a7c1c0e873e2fc2a6.tar.bz2 opensim-SC_OLD-7fa6646d6f75585d6ad3bd2a7c1c0e873e2fc2a6.tar.xz |
Added (experimental) terrain elevate command to allow whole terrain to be elevated with positive or negative values
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs index 4ff8e78..1a86572 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs | |||
@@ -96,6 +96,24 @@ namespace libTerrain | |||
96 | return this; | 96 | return this; |
97 | } | 97 | } |
98 | 98 | ||
99 | public Channel Elevate(double meters) | ||
100 | { | ||
101 | SetDiff(); | ||
102 | |||
103 | int x, y; | ||
104 | |||
105 | for (x = 0; x < w; x++) | ||
106 | { | ||
107 | for (y = 0; y < h; y++) | ||
108 | { | ||
109 | map[x, y] += meters; | ||
110 | } | ||
111 | } | ||
112 | |||
113 | return this; | ||
114 | } | ||
115 | |||
116 | |||
99 | public Channel Clip() | 117 | public Channel Clip() |
100 | { | 118 | { |
101 | int x, y; | 119 | int x, y; |