aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs18
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
29using System;
30using System.Collections.Generic;
31using System.Text;
32
33namespace libTerrain 29namespace 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