diff options
author | Adam Frisby | 2008-02-08 18:18:34 +0000 |
---|---|---|
committer | Adam Frisby | 2008-02-08 18:18:34 +0000 |
commit | 23e0ef34929ca09ec01afe75077895a2809bd281 (patch) | |
tree | 1af19bb673a4017e54b665201972fb0dc97abddb /OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs | |
parent | Rename README to README.txt (diff) | |
download | opensim-SC-23e0ef34929ca09ec01afe75077895a2809bd281.zip opensim-SC-23e0ef34929ca09ec01afe75077895a2809bd281.tar.gz opensim-SC-23e0ef34929ca09ec01afe75077895a2809bd281.tar.bz2 opensim-SC-23e0ef34929ca09ec01afe75077895a2809bd281.tar.xz |
* Made some terrain functions faster computationally.
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs | 6 |
1 files changed, 2 insertions, 4 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 | } |