diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Terrain/PaintBrushes')
5 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs index c1ef9d6..0e98111 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
72 | 72 | ||
73 | #region ITerrainPaintableEffect Members | 73 | #region ITerrainPaintableEffect Members |
74 | 74 | ||
75 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength) | 75 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) |
76 | { | 76 | { |
77 | int x, y; | 77 | int x, y; |
78 | double[,] tweak = new double[map.Width, map.Height]; | 78 | double[,] tweak = new double[map.Width, map.Height]; |
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
106 | { | 106 | { |
107 | for (y = 0; y < map.Height; y++) | 107 | for (y = 0; y < map.Height; y++) |
108 | { | 108 | { |
109 | double z = SphericalFactor(x, y, rx, ry, strength); | 109 | double z = SphericalFactor(x, y, rx, ry, strength) * duration; |
110 | 110 | ||
111 | if (z > 0) // add in non-zero amount | 111 | if (z > 0) // add in non-zero amount |
112 | { | 112 | { |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/LowerSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/LowerSphere.cs index b6696a9..2201584 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/LowerSphere.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/LowerSphere.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
34 | { | 34 | { |
35 | #region ITerrainPaintableEffect Members | 35 | #region ITerrainPaintableEffect Members |
36 | 36 | ||
37 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength) | 37 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) |
38 | { | 38 | { |
39 | int x, y; | 39 | int x, y; |
40 | for (x = 0; x < map.Width; x++) | 40 | for (x = 0; x < map.Width; x++) |
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
55 | z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry)); | 55 | z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry)); |
56 | 56 | ||
57 | if (z > 0.0) | 57 | if (z > 0.0) |
58 | map[x, y] -= z; | 58 | map[x, y] -= z * duration; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } | 61 | } |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/NoiseSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/NoiseSphere.cs index 0471408..776e31f 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/NoiseSphere.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/NoiseSphere.cs | |||
@@ -35,7 +35,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
35 | { | 35 | { |
36 | #region ITerrainPaintableEffect Members | 36 | #region ITerrainPaintableEffect Members |
37 | 37 | ||
38 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength) | 38 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) |
39 | { | 39 | { |
40 | int x, y; | 40 | int x, y; |
41 | for (x = 0; x < map.Width; x++) | 41 | for (x = 0; x < map.Width; x++) |
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
63 | } | 63 | } |
64 | 64 | ||
65 | if (z > 0.0) | 65 | if (z > 0.0) |
66 | map[x, y] += (noise - 0.5) * z; | 66 | map[x, y] += (noise - 0.5) * z * duration; |
67 | } | 67 | } |
68 | } | 68 | } |
69 | } | 69 | } |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RaiseSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RaiseSphere.cs index b0fda8e..5b9f410 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RaiseSphere.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RaiseSphere.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
34 | { | 34 | { |
35 | #region ITerrainPaintableEffect Members | 35 | #region ITerrainPaintableEffect Members |
36 | 36 | ||
37 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength) | 37 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) |
38 | { | 38 | { |
39 | int x, y; | 39 | int x, y; |
40 | for (x = 0; x < map.Width; x++) | 40 | for (x = 0; x < map.Width; x++) |
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
55 | z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry)); | 55 | z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry)); |
56 | 56 | ||
57 | if (z > 0.0) | 57 | if (z > 0.0) |
58 | map[x, y] += z; | 58 | map[x, y] += z * duration; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } | 61 | } |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/SmoothSphere.cs index d3ae73e..90bbafc 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/SmoothSphere.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/SmoothSphere.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
72 | 72 | ||
73 | #region ITerrainPaintableEffect Members | 73 | #region ITerrainPaintableEffect Members |
74 | 74 | ||
75 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength) | 75 | public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) |
76 | { | 76 | { |
77 | int x, y; | 77 | int x, y; |
78 | double[,] tweak = new double[map.Width, map.Height]; | 78 | double[,] tweak = new double[map.Width, map.Height]; |
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
116 | { | 116 | { |
117 | double da = z; | 117 | double da = z; |
118 | double a = (map[x, y] - tweak[x, y]) * da; | 118 | double a = (map[x, y] - tweak[x, y]) * da; |
119 | double newz = map[x, y] - a; | 119 | double newz = map[x, y] - (a * duration); |
120 | 120 | ||
121 | if (newz > 0.0) | 121 | if (newz > 0.0) |
122 | map[x, y] = newz; | 122 | map[x, y] = newz; |