diff options
author | Adam Frisby | 2008-03-06 23:14:24 +0000 |
---|---|---|
committer | Adam Frisby | 2008-03-06 23:14:24 +0000 |
commit | c9eb051936ee8e3a6885c8e4614a7d381cb34314 (patch) | |
tree | 20ffb02819a75b292495bf8b50895b382814418b /OpenSim/Region/Environment/LandManagement | |
parent | * Disabled ancient TerrainEngine. (diff) | |
download | opensim-SC_OLD-c9eb051936ee8e3a6885c8e4614a7d381cb34314.zip opensim-SC_OLD-c9eb051936ee8e3a6885c8e4614a7d381cb34314.tar.gz opensim-SC_OLD-c9eb051936ee8e3a6885c8e4614a7d381cb34314.tar.bz2 opensim-SC_OLD-c9eb051936ee8e3a6885c8e4614a7d381cb34314.tar.xz |
* Fix for exception in landmanager crash.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/LandManagement/Land.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs index 4c6168d..1eadccb 100644 --- a/OpenSim/Region/Environment/LandManagement/Land.cs +++ b/OpenSim/Region/Environment/LandManagement/Land.cs | |||
@@ -439,12 +439,25 @@ namespace OpenSim.Region.Environment.LandManagement | |||
439 | } | 439 | } |
440 | } | 440 | } |
441 | } | 441 | } |
442 | int tx = min_x * 4; | ||
443 | if (tx > 255) | ||
444 | tx = 255; | ||
445 | int ty = min_y * 4; | ||
446 | if (ty > 255) | ||
447 | ty = 255; | ||
442 | landData.AABBMin = | 448 | landData.AABBMin = |
443 | new LLVector3((float)(min_x * 4), (float)(min_y * 4), | 449 | new LLVector3((float)(min_x * 4), (float)(min_y * 4), |
444 | (float)m_scene.Heightmap[(min_x * 4), (min_y * 4)]); | 450 | (float)m_scene.Heightmap[tx, ty]); |
451 | |||
452 | tx = max_x * 4; | ||
453 | if (tx > 255) | ||
454 | tx = 255; | ||
455 | ty = max_y * 4; | ||
456 | if (ty > 255) | ||
457 | ty = 255; | ||
445 | landData.AABBMax = | 458 | landData.AABBMax = |
446 | new LLVector3((float)(max_x * 4), (float)(max_y * 4), | 459 | new LLVector3((float)(max_x * 4), (float)(max_y * 4), |
447 | (float)m_scene.Heightmap[(max_x * 4), (max_y * 4)]); | 460 | (float)m_scene.Heightmap[tx, ty]); |
448 | landData.area = tempArea; | 461 | landData.area = tempArea; |
449 | } | 462 | } |
450 | 463 | ||