From 03e3f88059908675652ec3da3b267bc04bab6c37 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Tue, 16 Sep 2008 07:19:22 +0000 Subject: From: mike pitman New patch (terrainedit2.patch) is attached that passes unit tests ( and in fact supplies the new unit test to pass..:) The previous failure was due to the change of the brush size to be linear instead of exponential, and the fact that the test parameters were assuming the exponentional brush size. This patch also removes dependency on 'duration' argument for adjustment step size. This should address the widely differing reports of instability with terrain editing. Note: 'doing this right' implies ultimately reading the parameters from the ini file, which this patch does not do. --- OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs') diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs b/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs index 61ebc5c..eaa674e 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs @@ -40,14 +40,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Tests TerrainChannel x = new TerrainChannel(256, 256); ITerrainPaintableEffect effect = new RaiseSphere(); - effect.PaintEffect(x, 128.0, 128.0, 50, 0.1); + effect.PaintEffect(x, 128.0, 128.0, 100, 0.1); Assert.That(x[128, 128] > 0.0, "Raise brush not raising values."); Assert.That(x[0, 128] > 0.0, "Raise brush lowering edge values."); x = new TerrainChannel(256, 256); effect = new LowerSphere(); - effect.PaintEffect(x, 128.0, 128.0, 50, 0.1); + effect.PaintEffect(x, 128.0, 128.0, 100, 0.1); Assert.That(x[128, 128] < 0.0, "Lower not lowering values."); Assert.That(x[0, 128] < 0.0, "Lower brush affecting edge values."); } -- cgit v1.1