aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Terrain/Tests
diff options
context:
space:
mode:
authorCharles Krinke2008-10-06 00:46:27 +0000
committerCharles Krinke2008-10-06 00:46:27 +0000
commit4f6cdc08d65cbdd60591d08d71c1c7648a3032cd (patch)
treec124af14da43a3b6f15d8a96d8ed151cbfca05b5 /OpenSim/Region/Environment/Modules/World/Terrain/Tests
parentPatch by Fly-Man, with modifications. Add more fields to DataSnapshot. (diff)
downloadopensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.zip
opensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.gz
opensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.bz2
opensim-SC-4f6cdc08d65cbdd60591d08d71c1c7648a3032cd.tar.xz
Mantis#1207. Thank you, TGlion for a patch that addresses:
Implementation of llModifyLand() and There is a bug on permission-check of land-terraforming: x an y-coordinates are interchanged on function-call ExternalChecksCanTerraformLand. Correct: x is west, and y is north. 2) Missing check of "Other allow to terraform-flag" (Parcel.ParcelFlags.AllowTerraform)
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/Tests')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs27
1 files changed, 19 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs b/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs
index eaa674e..71ea07d 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/Tests/TerrainTest.cs
@@ -37,19 +37,30 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.Tests
37 [Test] 37 [Test]
38 public void BrushTest() 38 public void BrushTest()
39 { 39 {
40 TerrainChannel x = new TerrainChannel(256, 256); 40 TerrainChannel map = new TerrainChannel(256, 256);
41 bool[,] allowMask = new bool[map.Width,map.Height];
42 int x;
43 int y;
44 for (x=0; x<map.Width; x++)
45 {
46 for (y=0; y<map.Height; y++)
47 {
48 allowMask[x,y] = true;
49 }
50 }
51
41 ITerrainPaintableEffect effect = new RaiseSphere(); 52 ITerrainPaintableEffect effect = new RaiseSphere();
42 53
43 effect.PaintEffect(x, 128.0, 128.0, 100, 0.1); 54 effect.PaintEffect(map, allowMask, 128.0, 128.0, 23.0, 50, 0.1);
44 Assert.That(x[128, 128] > 0.0, "Raise brush not raising values."); 55 Assert.That(map[128, 128] > 0.0, "Raise brush not raising values.");
45 Assert.That(x[0, 128] > 0.0, "Raise brush lowering edge values."); 56 Assert.That(map[0, 128] > 0.0, "Raise brush lowering edge values.");
46 57
47 x = new TerrainChannel(256, 256); 58 map = new TerrainChannel(256, 256);
48 effect = new LowerSphere(); 59 effect = new LowerSphere();
49 60
50 effect.PaintEffect(x, 128.0, 128.0, 100, 0.1); 61 effect.PaintEffect(map, allowMask, 128.0, 128.0, -1, 50, 0.1);
51 Assert.That(x[128, 128] < 0.0, "Lower not lowering values."); 62 Assert.That(map[128, 128] < 0.0, "Lower not lowering values.");
52 Assert.That(x[0, 128] < 0.0, "Lower brush affecting edge values."); 63 Assert.That(map[0, 128] < 0.0, "Lower brush affecting edge values.");
53 } 64 }
54 65
55 [Test] 66 [Test]