aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs14
1 files changed, 6 insertions, 8 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs
index 15631df..9e8f3a4 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs
@@ -28,8 +28,6 @@
28 28
29 29
30using System; 30using System;
31using System.Collections.Generic;
32using System.Text;
33 31
34namespace libTerrain 32namespace libTerrain
35{ 33{
@@ -63,12 +61,12 @@ namespace libTerrain
63 { 61 {
64 double z = size; 62 double z = size;
65 z *= z; 63 z *= z;
66 z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry)); 64 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry));
67 65
68 if (z < 0) 66 if (z < 0)
69 z = 0; 67 z = 0;
70 68
71 Set(x, y, map[x, y] + (z * amount)); 69 Set(x, y, map[x, y] + (z*amount));
72 } 70 }
73 } 71 }
74 } 72 }
@@ -88,12 +86,12 @@ namespace libTerrain
88 for (y = 0; y < h; y++) 86 for (y = 0; y < h; y++)
89 { 87 {
90 double z = size; 88 double z = size;
91 z -= Math.Sqrt(((x - rx) * (x - rx)) + ((y - ry) * (y - ry))); 89 z -= Math.Sqrt(((x - rx)*(x - rx)) + ((y - ry)*(y - ry)));
92 90
93 if (z < 0) 91 if (z < 0)
94 z = 0; 92 z = 0;
95 93
96 Set(x, y, map[x, y] + (z * amount)); 94 Set(x, y, map[x, y] + (z*amount));
97 } 95 }
98 } 96 }
99 } 97 }
@@ -126,12 +124,12 @@ namespace libTerrain
126 { 124 {
127 double z = size; 125 double z = size;
128 z *= z; 126 z *= z;
129 z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry)); 127 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry));
130 128
131 if (z < 0) 129 if (z < 0)
132 z = 0; 130 z = 0;
133 131
134 Set(x, y, map[x, y] - (z * amount)); 132 Set(x, y, map[x, y] - (z*amount));
135 } 133 }
136 } 134 }
137 } 135 }