* Moves another Legacy avatar inbounds check to Border

This commit is contained in:
Teravus Ovares (Dan Olivares)
2009-09-06 16:15:06 -04:00
parent 8855c2e54c
commit 511bddc8bc

View File

@@ -3140,11 +3140,17 @@ namespace OpenSim.Region.Framework.Scenes
if (!agent.child)
{
if (agent.startpos.X > (int)Constants.RegionSize - 1)
agent.startpos.X = (int)Constants.RegionSize - 1;
if (TestBorderCross(agent.startpos,Cardinals.E))
{
Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.E);
agent.startpos.X = crossedBorder.BorderLine.Z - 1;
}
if (agent.startpos.Y > (int)Constants.RegionSize - 1)
agent.startpos.Y = (int)Constants.RegionSize - 1;
if (TestBorderCross(agent.startpos, Cardinals.N))
{
Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.N);
agent.startpos.Y = crossedBorder.BorderLine.Z - 1;
}
// Honor parcel landing type and position.
ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);