diff options
author | Robert Adams | 2014-01-28 15:58:45 -0800 |
---|---|---|
committer | Robert Adams | 2014-01-28 15:58:45 -0800 |
commit | d25265ae82a3ac3afc32f65f820c9ed0b2bff31f (patch) | |
tree | ad74faca895e7bd43cd29f0de4cf7888fa8b6c45 /OpenSim/Region | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-d25265ae82a3ac3afc32f65f820c9ed0b2bff31f.zip opensim-SC_OLD-d25265ae82a3ac3afc32f65f820c9ed0b2bff31f.tar.gz opensim-SC_OLD-d25265ae82a3ac3afc32f65f820c9ed0b2bff31f.tar.bz2 opensim-SC_OLD-d25265ae82a3ac3afc32f65f820c9ed0b2bff31f.tar.xz |
Fix terrain tests by properly initializing low detail terrain to zero height.
Also remove PI heightmap test as new heightmaps only have two significant digits.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainTest.cs | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index f8f4986..939512f 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -134,7 +134,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
134 | public LandObject(UUID owner_id, bool is_group_owned, Scene scene) | 134 | public LandObject(UUID owner_id, bool is_group_owned, Scene scene) |
135 | { | 135 | { |
136 | m_scene = scene; | 136 | m_scene = scene; |
137 | m_landBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit]; | 137 | if (m_scene == null) |
138 | m_landBitmap = new bool[Constants.RegionSize / landUnit, Constants.RegionSize / landUnit]; | ||
139 | else | ||
140 | m_landBitmap = new bool[m_scene.RegionInfo.RegionSizeX / landUnit, m_scene.RegionInfo.RegionSizeY / landUnit]; | ||
138 | 141 | ||
139 | LandData.OwnerID = owner_id; | 142 | LandData.OwnerID = owner_id; |
140 | if (is_group_owned) | 143 | if (is_group_owned) |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainTest.cs b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainTest.cs index be719ea..d557168 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainTest.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainTest.cs | |||
@@ -100,10 +100,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Tests | |||
100 | x[0, 0] -= 1.0; | 100 | x[0, 0] -= 1.0; |
101 | Assert.That(x[0, 0] == 4.0, "Terrain addition/subtraction error."); | 101 | Assert.That(x[0, 0] == 4.0, "Terrain addition/subtraction error."); |
102 | 102 | ||
103 | x[0, 0] = Math.PI; | ||
104 | double[,] doublesExport = x.GetDoubles(); | ||
105 | Assert.That(doublesExport[0, 0] == Math.PI, "Export to double[,] array not working correctly."); | ||
106 | |||
107 | x[0, 0] = 1.0; | 103 | x[0, 0] = 1.0; |
108 | float[] floatsExport = x.GetFloatsSerialised(); | 104 | float[] floatsExport = x.GetFloatsSerialised(); |
109 | Assert.That(floatsExport[0] == 1.0f, "Export to float[] not working correctly."); | 105 | Assert.That(floatsExport[0] == 1.0f, "Export to float[] not working correctly."); |