diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land')
3 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 1193057..281c143 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1384,9 +1384,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1384 | } | 1384 | } |
1385 | 1385 | ||
1386 | for (int i = 0; i < data.Count; i++) | 1386 | for (int i = 0; i < data.Count; i++) |
1387 | { | ||
1388 | IncomingLandObjectFromStorage(data[i]); | 1387 | IncomingLandObjectFromStorage(data[i]); |
1389 | } | ||
1390 | } | 1388 | } |
1391 | 1389 | ||
1392 | public void IncomingLandObjectFromStorage(LandData data) | 1390 | public void IncomingLandObjectFromStorage(LandData data) |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index d5b2adb..8ddff99 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -748,9 +748,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
748 | int ty = min_y * 4; | 748 | int ty = min_y * 4; |
749 | if (ty > ((int)Constants.RegionSize - 1)) | 749 | if (ty > ((int)Constants.RegionSize - 1)) |
750 | ty = ((int)Constants.RegionSize - 1); | 750 | ty = ((int)Constants.RegionSize - 1); |
751 | |||
751 | LandData.AABBMin = | 752 | LandData.AABBMin = |
752 | new Vector3((float) (min_x * 4), (float) (min_y * 4), | 753 | new Vector3( |
753 | (float) m_scene.Heightmap[tx, ty]); | 754 | (float)(min_x * 4), (float)(min_y * 4), m_scene != null ? (float)m_scene.Heightmap[tx, ty] : 0); |
754 | 755 | ||
755 | tx = max_x * 4; | 756 | tx = max_x * 4; |
756 | if (tx > ((int)Constants.RegionSize - 1)) | 757 | if (tx > ((int)Constants.RegionSize - 1)) |
@@ -758,9 +759,11 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
758 | ty = max_y * 4; | 759 | ty = max_y * 4; |
759 | if (ty > ((int)Constants.RegionSize - 1)) | 760 | if (ty > ((int)Constants.RegionSize - 1)) |
760 | ty = ((int)Constants.RegionSize - 1); | 761 | ty = ((int)Constants.RegionSize - 1); |
761 | LandData.AABBMax = | 762 | |
762 | new Vector3((float) (max_x * 4), (float) (max_y * 4), | 763 | LandData.AABBMax |
763 | (float) m_scene.Heightmap[tx, ty]); | 764 | = new Vector3( |
765 | (float)(max_x * 4), (float)(max_y * 4), m_scene != null ? (float)m_scene.Heightmap[tx, ty] : 0); | ||
766 | |||
764 | LandData.Area = tempArea; | 767 | LandData.Area = tempArea; |
765 | } | 768 | } |
766 | 769 | ||
diff --git a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs index b5ee4d2..14eca42 100644 --- a/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs +++ b/OpenSim/Region/CoreModules/World/Land/Tests/PrimCountModuleTests.cs | |||
@@ -41,7 +41,7 @@ using OpenSim.Tests.Common.Mock; | |||
41 | namespace OpenSim.Region.CoreModules.World.Land.Tests | 41 | namespace OpenSim.Region.CoreModules.World.Land.Tests |
42 | { | 42 | { |
43 | [TestFixture] | 43 | [TestFixture] |
44 | public class PrimCountModuleTests | 44 | public class PrimCountModuleTests : OpenSimTestCase |
45 | { | 45 | { |
46 | protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000"); | 46 | protected UUID m_userId = new UUID("00000000-0000-0000-0000-100000000000"); |
47 | protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000"); | 47 | protected UUID m_groupId = new UUID("00000000-0000-0000-8888-000000000000"); |