diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-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."); |