aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs6
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs18
2 files changed, 8 insertions, 16 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs
index df34eeb..0946c6a 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs
@@ -109,10 +109,8 @@ namespace libTerrain
109 z *= z; 109 z *= z;
110 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); 110 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry));
111 111
112 if (z < 0) 112 if (z > 0.0)
113 z = 0; 113 Set(x, y, Tools.LinearInterpolate(map[x, y], height, z));
114
115 Set(x, y, Tools.LinearInterpolate(map[x, y], height, z));
116 } 114 }
117 } 115 }
118 } 116 }
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs
index 9a8b8f5..0173400 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs
@@ -63,10 +63,8 @@ namespace libTerrain
63 z *= z; 63 z *= z;
64 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); 64 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry));
65 65
66 if (z < 0) 66 if (z > 0.0)
67 z = 0; 67 Set(x, y, map[x, y] + (z * amount));
68
69 Set(x, y, map[x, y] + (z*amount));
70 } 68 }
71 } 69 }
72 } 70 }
@@ -88,10 +86,8 @@ namespace libTerrain
88 double z = size; 86 double z = size;
89 z -= Math.Sqrt(((x - rx)*(x - rx)) + ((y - ry)*(y - ry))); 87 z -= Math.Sqrt(((x - rx)*(x - rx)) + ((y - ry)*(y - ry)));
90 88
91 if (z < 0) 89 if (z > 0.0)
92 z = 0; 90 Set(x, y, map[x, y] + (z * amount));
93
94 Set(x, y, map[x, y] + (z*amount));
95 } 91 }
96 } 92 }
97 } 93 }
@@ -126,10 +122,8 @@ namespace libTerrain
126 z *= z; 122 z *= z;
127 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); 123 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry));
128 124
129 if (z < 0) 125 if (z > 0.0)
130 z = 0; 126 Set(x, y, map[x, y] + (z * amount));
131
132 Set(x, y, map[x, y] - (z*amount));
133 } 127 }
134 } 128 }
135 } 129 }