From 87b313792821cb842fd54b568302b6877c4e53f8 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 3 May 2008 20:00:35 +0000 Subject: * 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. --- .../Environment/Modules/World/Terrain/Effects/CookieCutter.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/Effects/CookieCutter.cs') 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 @@ */ using System; using OpenSim.Region.Environment.Interfaces; -using OpenSim.Region.Environment.Modules.World.Terrain.FloodBrushes; using OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes; namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects @@ -37,7 +36,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects public void RunEffect(ITerrainChannel map) { - SmoothArea smooth = new SmoothArea(); ITerrainPaintableEffect eroder = new WeatherSphere(); bool[,] cliffMask = new bool[map.Width,map.Height]; @@ -60,9 +58,9 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects // Add a little height. (terrain should now be above water, mostly.) map[x, y] += 20; - int channelsX = 4; + const int channelsX = 4; int channelWidth = (map.Width / channelsX / 4); - int channelsY = 4; + const int channelsY = 4; int channelHeight = (map.Height / channelsY / 4); SetLowerChannel(map, cliffMask, channelMask, x, y, channelsX, channelWidth, map.Width, x); @@ -78,7 +76,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Effects { for (y = 0; y < map.Height; y++) { - if (cliffMask[x, y] == true) + if (cliffMask[x, y]) eroder.PaintEffect(map, x, y, 4, 0.1); } } -- cgit v1.1