diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes')
5 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/FlattenArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/FlattenArea.cs index 496da63..f3c8a13 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/FlattenArea.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/FlattenArea.cs | |||
@@ -37,7 +37,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes | |||
37 | { | 37 | { |
38 | double sum = 0.0; | 38 | double sum = 0.0; |
39 | double steps = 0.0; | 39 | double steps = 0.0; |
40 | double avg; | ||
41 | 40 | ||
42 | int x, y; | 41 | int x, y; |
43 | for (x = 0; x < map.Width; x++) | 42 | for (x = 0; x < map.Width; x++) |
@@ -52,7 +51,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes | |||
52 | } | 51 | } |
53 | } | 52 | } |
54 | 53 | ||
55 | avg = sum / steps; | 54 | double avg = sum / steps; |
56 | 55 | ||
57 | double str = 0.1 * strength; // == 0.2 in the default client | 56 | double str = 0.1 * strength; // == 0.2 in the default client |
58 | 57 | ||
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/NoiseArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/NoiseArea.cs index 6c8e76e..f7c4893 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/NoiseArea.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/NoiseArea.cs | |||
@@ -36,9 +36,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes | |||
36 | 36 | ||
37 | public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength) | 37 | public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength) |
38 | { | 38 | { |
39 | int x, y; | 39 | int x; |
40 | for (x = 0; x < map.Width; x++) | 40 | for (x = 0; x < map.Width; x++) |
41 | { | 41 | { |
42 | int y; | ||
42 | for (y = 0; y < map.Height; y++) | 43 | for (y = 0; y < map.Height; y++) |
43 | { | 44 | { |
44 | if (fillArea[x, y]) | 45 | if (fillArea[x, y]) |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RaiseArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RaiseArea.cs index 5cb236c..5eff3d6 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RaiseArea.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RaiseArea.cs | |||
@@ -35,9 +35,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes | |||
35 | 35 | ||
36 | public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength) | 36 | public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength) |
37 | { | 37 | { |
38 | int x, y; | 38 | int x; |
39 | for (x = 0; x < map.Width; x++) | 39 | for (x = 0; x < map.Width; x++) |
40 | { | 40 | { |
41 | int y; | ||
41 | for (y = 0; y < map.Height; y++) | 42 | for (y = 0; y < map.Height; y++) |
42 | { | 43 | { |
43 | if (fillArea[x, y]) | 44 | if (fillArea[x, y]) |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs index f1d9ce6..bebcae5 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/RevertArea.cs | |||
@@ -42,9 +42,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes | |||
42 | 42 | ||
43 | public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength) | 43 | public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength) |
44 | { | 44 | { |
45 | int x, y; | 45 | int x; |
46 | for (x = 0; x < map.Width; x++) | 46 | for (x = 0; x < map.Width; x++) |
47 | { | 47 | { |
48 | int y; | ||
48 | for (y = 0; y < map.Height; y++) | 49 | for (y = 0; y < map.Height; y++) |
49 | { | 50 | { |
50 | if (fillArea[x, y]) | 51 | if (fillArea[x, y]) |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/SmoothArea.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/SmoothArea.cs index d17d9cb..8fd805e 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/SmoothArea.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FloodBrushes/SmoothArea.cs | |||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes | |||
92 | if (y < 0.0) | 92 | if (y < 0.0) |
93 | y = 0.0; | 93 | y = 0.0; |
94 | 94 | ||
95 | int stepSize = 1; | 95 | const int stepSize = 1; |
96 | double h00 = map[(int) x, (int) y]; | 96 | double h00 = map[(int) x, (int) y]; |
97 | double h10 = map[(int) x + stepSize, (int) y]; | 97 | double h10 = map[(int) x + stepSize, (int) y]; |
98 | double h01 = map[(int) x, (int) y + stepSize]; | 98 | double h01 = map[(int) x, (int) y + stepSize]; |