From 8e27656fcc0331c8521e4ef8e8ece4495f1f32ae Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 12 Mar 2008 11:02:30 +0000 Subject: * Refactored some terrain brushes to move out some common functions into TerrainUtil class. More needs doing. * Adjusted strength of brushes to Math.Pow(2,size), this should in theory work closer to how it was before. --- .../Environment/Modules/Terrain/PaintBrushes/RevertSphere.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RevertSphere.cs') diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RevertSphere.cs index 9d9c462..bc98b07 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RevertSphere.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RevertSphere.cs @@ -43,6 +43,13 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes public void PaintEffect(ITerrainChannel map, double rx, double ry, double strength, double duration) { + strength = TerrainUtil.MetersToSphericalStrength(strength); + + if (duration > 1.0) + duration = 1.0; + if (duration < 0) + return; + int x, y; for (x = 0; x < map.Width; x++) { -- cgit v1.1