* Moves another Legacy avatar inbounds check to Border

remotes/origin/0.6.7-post-fixes
Teravus Ovares (Dan Olivares) 2009-09-06 16:15:06 -04:00
parent 8855c2e54c
commit 511bddc8bc
1 changed files with 10 additions and 4 deletions

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);