From 9f3170b49fec6db42171eba0fe86e3f44347ff88 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 21 Dec 2007 03:16:42 +0000 Subject: * Update to send the parcel gathering error to a .Debug message.. so that a developer can see it in the environment, but it doesn't cause any adverse effects. --- .../Environment/LandManagement/LandManager.cs | 64 ++++++++++++---------- 1 file changed, 35 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region/Environment/LandManagement/LandManager.cs') 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 //Now for border control - - Land westParcel = getLandObject((x - 1) * 4, y * 4); - Land southParcel = getLandObject(x * 4, (y - 1) * 4); - if (x == 0) - { - tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST); - } - else if (westParcel != null && westParcel != currentParcelBlock) + try { - tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST); + Land westParcel = getLandObject((x - 1) * 4, y * 4); + Land southParcel = getLandObject(x * 4, (y - 1) * 4); + if (x == 0) + { + tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST); + } + else if (westParcel != null && westParcel != currentParcelBlock) + { + tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST); + } + + if (y == 0) + { + tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_SOUTH); + } + else if (southParcel != null && southParcel != currentParcelBlock) + { + tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_SOUTH); + } + + byteArray[byteArrayCount] = tempByte; + byteArrayCount++; + if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) + { + byteArrayCount = 0; + packet = new ParcelOverlayPacket(); + packet.ParcelData.Data = byteArray; + packet.ParcelData.SequenceID = sequenceID; + remote_client.OutPacket((Packet)packet, ThrottleOutPacketType.Task); + sequenceID++; + byteArray = new byte[LAND_BLOCKS_PER_PACKET]; + } } - - if (y == 0) - { - tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_SOUTH); - } - else if (southParcel != null && southParcel != currentParcelBlock) - { - tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_SOUTH); - } - - byteArray[byteArrayCount] = tempByte; - byteArrayCount++; - if (byteArrayCount >= LAND_BLOCKS_PER_PACKET) + catch (System.Exception) { - byteArrayCount = 0; - packet = new ParcelOverlayPacket(); - packet.ParcelData.Data = byteArray; - packet.ParcelData.SequenceID = sequenceID; - remote_client.OutPacket((Packet)packet, ThrottleOutPacketType.Task); - sequenceID++; - byteArray = new byte[LAND_BLOCKS_PER_PACKET]; + OpenSim.Framework.Console.MainLog.Instance.Debug("LAND", "Skipped Land checks because avatar is out of bounds"); } } } -- cgit v1.1