aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/LandManagement/LandManager.cs64
1 files changed, 35 insertions, 29 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs
index c360f7f..7e39b84 100644
--- a/OpenSim/Region/Environment/LandManagement/LandManager.cs
+++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs
@@ -457,38 +457,44 @@ namespace OpenSim.Region.Environment.LandManagement
457 457
458 458
459 //Now for border control 459 //Now for border control
460 460 try
461 Land westParcel = getLandObject((x - 1) * 4, y * 4);
462 Land southParcel = getLandObject(x * 4, (y - 1) * 4);
463 if (x == 0)
464 {
465 tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST);
466 }
467 else if (westParcel != null && westParcel != currentParcelBlock)
468 { 461 {
469 tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST); 462 Land westParcel = getLandObject((x - 1) * 4, y * 4);
463 Land southParcel = getLandObject(x * 4, (y - 1) * 4);
464 if (x == 0)
465 {
466 tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST);
467 }
468 else if (westParcel != null && westParcel != currentParcelBlock)
469 {
470 tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST);
471 }
472
473 if (y == 0)
474 {
475 tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_SOUTH);
476 }
477 else if (southParcel != null && southParcel != currentParcelBlock)
478 {
479 tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_SOUTH);
480 }
481
482 byteArray[byteArrayCount] = tempByte;
483 byteArrayCount++;
484 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET)
485 {
486 byteArrayCount = 0;
487 packet = new ParcelOverlayPacket();
488 packet.ParcelData.Data = byteArray;
489 packet.ParcelData.SequenceID = sequenceID;
490 remote_client.OutPacket((Packet)packet, ThrottleOutPacketType.Task);
491 sequenceID++;
492 byteArray = new byte[LAND_BLOCKS_PER_PACKET];
493 }
470 } 494 }
471 495 catch (System.Exception)
472 if (y == 0)
473 {
474 tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_SOUTH);
475 }
476 else if (southParcel != null && southParcel != currentParcelBlock)
477 {
478 tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_SOUTH);
479 }
480
481 byteArray[byteArrayCount] = tempByte;
482 byteArrayCount++;
483 if (byteArrayCount >= LAND_BLOCKS_PER_PACKET)
484 { 496 {
485 byteArrayCount = 0; 497 OpenSim.Framework.Console.MainLog.Instance.Debug("LAND", "Skipped Land checks because avatar is out of bounds");
486 packet = new ParcelOverlayPacket();
487 packet.ParcelData.Data = byteArray;
488 packet.ParcelData.SequenceID = sequenceID;
489 remote_client.OutPacket((Packet)packet, ThrottleOutPacketType.Task);
490 sequenceID++;
491 byteArray = new byte[LAND_BLOCKS_PER_PACKET];
492 } 498 }
493 } 499 }
494 } 500 }