diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandObject.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 13 |
1 files changed, 8 insertions, 5 deletions
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 | ||