diff options
author | lbsa71 | 2007-10-30 09:05:31 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-30 09:05:31 +0000 |
commit | 67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch) | |
tree | 20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs | |
parent | * Deleted .user file (diff) | |
download | opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2 opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz |
* Optimized usings
* Shortened type references
* Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs index 9148c3c..0ca3d48 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs | |||
@@ -26,10 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | |||
33 | namespace libTerrain | 29 | namespace libTerrain |
34 | { | 30 | { |
35 | partial class Channel | 31 | partial class Channel |
@@ -47,10 +43,11 @@ namespace libTerrain | |||
47 | double[,] lastFrame; | 43 | double[,] lastFrame; |
48 | double[,] thisFrame; | 44 | double[,] thisFrame; |
49 | 45 | ||
50 | lastFrame = (double[,])map.Clone(); | 46 | lastFrame = (double[,]) map.Clone(); |
51 | thisFrame = (double[,])map.Clone(); | 47 | thisFrame = (double[,]) map.Clone(); |
52 | 48 | ||
53 | NeighbourSystem type = NeighbourSystem.Moore; // Using moore neighbourhood (twice as computationally expensive) | 49 | NeighbourSystem type = NeighbourSystem.Moore; |
50 | // Using moore neighbourhood (twice as computationally expensive) | ||
54 | int NEIGHBOUR_ME = 4; // I am always 4 in both systems. | 51 | int NEIGHBOUR_ME = 4; // I am always 4 in both systems. |
55 | 52 | ||
56 | int NEIGHBOUR_MAX = type == NeighbourSystem.Moore ? 9 : 5; | 53 | int NEIGHBOUR_MAX = type == NeighbourSystem.Moore ? 9 : 5; |
@@ -88,19 +85,18 @@ namespace libTerrain | |||
88 | 85 | ||
89 | if (target > heightF + talus) | 86 | if (target > heightF + talus) |
90 | { | 87 | { |
91 | double calc = c * ((target - heightF) - talus); | 88 | double calc = c*((target - heightF) - talus); |
92 | heightF += calc; | 89 | heightF += calc; |
93 | target -= calc; | 90 | target -= calc; |
94 | } | 91 | } |
95 | 92 | ||
96 | thisFrame[x, y] = heightF; | 93 | thisFrame[x, y] = heightF; |
97 | thisFrame[coords[0], coords[1]] = target; | 94 | thisFrame[coords[0], coords[1]] = target; |
98 | |||
99 | } | 95 | } |
100 | } | 96 | } |
101 | } | 97 | } |
102 | } | 98 | } |
103 | lastFrame = (double[,])thisFrame.Clone(); | 99 | lastFrame = (double[,]) thisFrame.Clone(); |
104 | } | 100 | } |
105 | 101 | ||
106 | map = thisFrame; | 102 | map = thisFrame; |
@@ -109,4 +105,4 @@ namespace libTerrain | |||
109 | return this; | 105 | return this; |
110 | } | 106 | } |
111 | } | 107 | } |
112 | } | 108 | } \ No newline at end of file |