From 511bddc8bc5783919a8135b69ddd6c974fbcf1f7 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Sun, 6 Sep 2009 16:15:06 -0400 Subject: * Moves another Legacy avatar inbounds check to Border --- OpenSim/Region/Framework/Scenes/Scene.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c25ae10..278091f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -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); -- cgit v1.1