diff options
author | mingchen | 2007-12-21 21:04:27 +0000 |
---|---|---|
committer | mingchen | 2007-12-21 21:04:27 +0000 |
commit | 21e32196c7fa6824b0146142bda8a5c6b3f162a9 (patch) | |
tree | d4f5bccc44c4f8552df3c633d2ecd06481ac7783 /OpenSim/Region/Environment/LandManagement | |
parent | Refix bug where inventory textures don't appear in prim edit texture selectio... (diff) | |
download | opensim-SC_OLD-21e32196c7fa6824b0146142bda8a5c6b3f162a9.zip opensim-SC_OLD-21e32196c7fa6824b0146142bda8a5c6b3f162a9.tar.gz opensim-SC_OLD-21e32196c7fa6824b0146142bda8a5c6b3f162a9.tar.bz2 opensim-SC_OLD-21e32196c7fa6824b0146142bda8a5c6b3f162a9.tar.xz |
*Fixed logic issue in LandManager that caused an 'invalid parcel' error to spew in the debug when land was selected
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/LandManagement/LandManager.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index 7e39b84..ecd458d 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs | |||
@@ -459,8 +459,17 @@ namespace OpenSim.Region.Environment.LandManagement | |||
459 | //Now for border control | 459 | //Now for border control |
460 | try | 460 | try |
461 | { | 461 | { |
462 | Land westParcel = getLandObject((x - 1) * 4, y * 4); | 462 | Land westParcel = null; |
463 | Land southParcel = getLandObject(x * 4, (y - 1) * 4); | 463 | Land southParcel = null; |
464 | if (x > 0) | ||
465 | { | ||
466 | westParcel = getLandObject((x - 1) * 4, y * 4); | ||
467 | } | ||
468 | if (y > 0) | ||
469 | { | ||
470 | southParcel = getLandObject(x * 4, (y - 1) * 4); | ||
471 | } | ||
472 | |||
464 | if (x == 0) | 473 | if (x == 0) |
465 | { | 474 | { |
466 | tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST); | 475 | tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST); |
@@ -492,9 +501,9 @@ namespace OpenSim.Region.Environment.LandManagement | |||
492 | byteArray = new byte[LAND_BLOCKS_PER_PACKET]; | 501 | byteArray = new byte[LAND_BLOCKS_PER_PACKET]; |
493 | } | 502 | } |
494 | } | 503 | } |
495 | catch (System.Exception) | 504 | catch (System.Exception e) |
496 | { | 505 | { |
497 | OpenSim.Framework.Console.MainLog.Instance.Debug("LAND", "Skipped Land checks because avatar is out of bounds"); | 506 | OpenSim.Framework.Console.MainLog.Instance.Debug("LAND", "Skipped Land checks because avatar is out of bounds: " + e.Message); |
498 | } | 507 | } |
499 | } | 508 | } |
500 | } | 509 | } |