aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Terrain/Effects
diff options
context:
space:
mode:
authorAdam Frisby2008-05-03 20:00:35 +0000
committerAdam Frisby2008-05-03 20:00:35 +0000
commit87b313792821cb842fd54b568302b6877c4e53f8 (patch)
tree446719156d1e8d8c12bc3bcd69546f04ba0d79ab /OpenSim/Region/Environment/Modules/World/Terrain/Effects
parent* Refactor: Move MoveFolder() and PurgeFolder() into CachedUserInfo (which ar... (diff)
downloadopensim-SC-87b313792821cb842fd54b568302b6877c4e53f8.zip
opensim-SC-87b313792821cb842fd54b568302b6877c4e53f8.tar.gz
opensim-SC-87b313792821cb842fd54b568302b6877c4e53f8.tar.bz2
opensim-SC-87b313792821cb842fd54b568302b6877c4e53f8.tar.xz
* Cleaned up code in Terrain, Tree and Map modules.
* Fixed a bug with Terragen loader where it would do bad things on a non 256x256 sized terrain. Now loads the array correctly. * Moved MapImageModule.cs to Modules/World/WorldMap * Changed Location.RegionHandle to use Helpers.GetUlong instead of doing it ourselves.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/Effects')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs b/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs
index a2e0c40..399287d 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs
@@ -26,7 +26,6 @@
26 */ 26 */
27using System; 27using System;
28using OpenSim.Region.Environment.Interfaces; 28using OpenSim.Region.Environment.Interfaces;
29using OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes;
30using OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes; 29using OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes;
31 30
32namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects 31namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects
@@ -37,7 +36,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects
37 36
38 public void RunEffect(ITerrainChannel map) 37 public void RunEffect(ITerrainChannel map)
39 { 38 {
40 SmoothArea smooth = new SmoothArea();
41 ITerrainPaintableEffect eroder = new WeatherSphere(); 39 ITerrainPaintableEffect eroder = new WeatherSphere();
42 40
43 bool[,] cliffMask = new bool[map.Width,map.Height]; 41 bool[,] cliffMask = new bool[map.Width,map.Height];
@@ -60,9 +58,9 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects
60 // Add a little height. (terrain should now be above water, mostly.) 58 // Add a little height. (terrain should now be above water, mostly.)
61 map[x, y] += 20; 59 map[x, y] += 20;
62 60
63 int channelsX = 4; 61 const int channelsX = 4;
64 int channelWidth = (map.Width / channelsX / 4); 62 int channelWidth = (map.Width / channelsX / 4);
65 int channelsY = 4; 63 const int channelsY = 4;
66 int channelHeight = (map.Height / channelsY / 4); 64 int channelHeight = (map.Height / channelsY / 4);
67 65
68 SetLowerChannel(map, cliffMask, channelMask, x, y, channelsX, channelWidth, map.Width, x); 66 SetLowerChannel(map, cliffMask, channelMask, x, y, channelsX, channelWidth, map.Width, x);
@@ -78,7 +76,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects
78 { 76 {
79 for (y = 0; y < map.Height; y++) 77 for (y = 0; y < map.Height; y++)
80 { 78 {
81 if (cliffMask[x, y] == true) 79 if (cliffMask[x, y])
82 eroder.PaintEffect(map, x, y, 4, 0.1); 80 eroder.PaintEffect(map, x, y, 4, 0.1);
83 } 81 }
84 } 82 }