*Fixed logic issue in LandManager that caused an 'invalid parcel' error to spew in the debug when land was selected

afrisby
mingchen 2007-12-21 21:04:27 +00:00
parent 42bc256e4f
commit 21e32196c7
2 changed files with 14 additions and 4 deletions

View File

@ -1886,6 +1886,7 @@ namespace OpenSim.Region.ClientStack
objdata.Sound = LLUUID.Zero;
LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
objdata.TextureEntry = ntex.ToBytes();
objdata.State = 0;
objdata.Data = new byte[0];

View File

@ -459,8 +459,17 @@ namespace OpenSim.Region.Environment.LandManagement
//Now for border control
try
{
Land westParcel = getLandObject((x - 1) * 4, y * 4);
Land southParcel = getLandObject(x * 4, (y - 1) * 4);
Land westParcel = null;
Land southParcel = null;
if (x > 0)
{
westParcel = getLandObject((x - 1) * 4, y * 4);
}
if (y > 0)
{
southParcel = getLandObject(x * 4, (y - 1) * 4);
}
if (x == 0)
{
tempByte = Convert.ToByte(tempByte | LAND_FLAG_PROPERTY_BORDER_WEST);
@ -492,9 +501,9 @@ namespace OpenSim.Region.Environment.LandManagement
byteArray = new byte[LAND_BLOCKS_PER_PACKET];
}
}
catch (System.Exception)
catch (System.Exception e)
{
OpenSim.Framework.Console.MainLog.Instance.Debug("LAND", "Skipped Land checks because avatar is out of bounds");
OpenSim.Framework.Console.MainLog.Instance.Debug("LAND", "Skipped Land checks because avatar is out of bounds: " + e.Message);
}
}
}