From efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 27 Dec 2007 21:41:48 +0000 Subject: * Optimized usings * shortened references * Removed redundant 'this' * Normalized EOF --- .../Properties/AssemblyInfo.cs | 2 +- .../Region/Terrain.BasicTerrain/TerrainEngine.cs | 35 +++++++++++----------- .../Region/Terrain.BasicTerrain/TerrainFilter.cs | 2 +- .../libTerrainBSD/Bitmap/Bitmap.cs | 2 +- .../libTerrainBSD/Channel/Channel.cs | 2 +- .../libTerrainBSD/Channel/Common.cs | 2 +- .../libTerrainBSD/Channel/Editing/Flatten.cs | 2 +- .../libTerrainBSD/Channel/Editing/Raise.cs | 2 +- .../libTerrainBSD/Channel/File.cs | 2 +- .../libTerrainBSD/Channel/Generators/Fracture.cs | 2 +- .../libTerrainBSD/Channel/Generators/Gradient.cs | 2 +- .../Channel/Generators/HillPlanter.cs | 2 +- .../libTerrainBSD/Channel/Generators/Noise.cs | 2 +- .../libTerrainBSD/Channel/Generators/Spiral.cs | 2 +- .../libTerrainBSD/Channel/Generators/Voronoi.cs | 2 +- .../libTerrainBSD/Channel/Generators/Worms.cs | 2 +- .../libTerrainBSD/Channel/Grid.cs | 2 +- .../Channel/Manipulators/AerobicErosion.cs | 2 +- .../Channel/Manipulators/HydraulicErosion.cs | 2 +- .../Channel/Manipulators/NavierStokes.cs | 2 +- .../Channel/Manipulators/ThermalWeathering.cs | 2 +- .../libTerrainBSD/Channel/Neighbours.cs | 2 +- .../libTerrainBSD/Channel/Operators.cs | 2 +- 23 files changed, 40 insertions(+), 39 deletions(-) (limited to 'OpenSim/Region/Terrain.BasicTerrain') diff --git a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs index 3c0facb..3195140 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs @@ -62,4 +62,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: [assembly : AssemblyVersion("1.0.0.0")] -[assembly : AssemblyFileVersion("1.0.0.0")] +[assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index e89ff62..2405e86 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs @@ -159,12 +159,13 @@ namespace OpenSim.Region.Terrain /// The action to be performed /// Distance from the north border where the cursor is located /// Distance from the west border where the cursor is located - public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west, float south, float east, + public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west, + float south, float east, IClientAPI remoteUser) { // Shiny. double size = (double) (1 << brushsize); - + /* Okay, so here's the deal * This has to handle both when a user draws on the terrain *and* when a user selects * a selection of AABB on terrain and applies whatever routine the client requests @@ -189,8 +190,8 @@ namespace OpenSim.Region.Terrain * Again, libTerrain is yx instead of xy.. so, it's reflected in the function calls * */ - - + + switch (action) { case 0: @@ -199,7 +200,7 @@ namespace OpenSim.Region.Terrain { for (float y = west; y <= east; y++) { - FlattenTerrain(y, x, size, (double)seconds / 5.0); + FlattenTerrain(y, x, size, (double) seconds/5.0); lastEdit = DateTime.Now; } } @@ -210,7 +211,7 @@ namespace OpenSim.Region.Terrain { for (float y = west; y <= east; y++) { - RaiseTerrain(y, x, size, (double)seconds / 5.0); + RaiseTerrain(y, x, size, (double) seconds/5.0); lastEdit = DateTime.Now; } } @@ -221,7 +222,7 @@ namespace OpenSim.Region.Terrain { for (float y = west; y <= east; y++) { - LowerTerrain(y, x, size, (double)seconds / 5.0); + LowerTerrain(y, x, size, (double) seconds/5.0); lastEdit = DateTime.Now; } } @@ -235,13 +236,13 @@ namespace OpenSim.Region.Terrain // //for (float x = south; x <= north; x++) //{ - //for (float y = west; y <= east; y++) - //{ - //SmoothTerrain(y, x , size, (double)seconds / 5.0); - //} + //for (float y = west; y <= east; y++) + //{ + //SmoothTerrain(y, x , size, (double)seconds / 5.0); + //} //} - SmoothTerrain(west, north, size, (double)seconds / 5.0); + SmoothTerrain(west, north, size, (double) seconds/5.0); break; case 4: @@ -250,7 +251,7 @@ namespace OpenSim.Region.Terrain { for (float y = west; y <= east; y++) { - NoiseTerrain(y, x, size, (double)seconds / 5.0); + NoiseTerrain(y, x, size, (double) seconds/5.0); lastEdit = DateTime.Now; } } @@ -261,7 +262,7 @@ namespace OpenSim.Region.Terrain { for (float y = west; y <= east; y++) { - RevertTerrain(y, x, size, (double)seconds / 5.0); + RevertTerrain(y, x, size, (double) seconds/5.0); lastEdit = DateTime.Now; } } @@ -1351,16 +1352,16 @@ namespace OpenSim.Region.Terrain } Channel copy = heightmap.Copy(); - for (int y = 0; y