aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 8f3ba97..3b91dd0 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3158,11 +3158,17 @@ namespace OpenSim.Region.Framework.Scenes
3158 3158
3159 if (!agent.child) 3159 if (!agent.child)
3160 { 3160 {
3161 if (agent.startpos.X > (int)Constants.RegionSize - 1) 3161 if (TestBorderCross(agent.startpos,Cardinals.E))
3162 agent.startpos.X = (int)Constants.RegionSize - 1; 3162 {
3163 Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.E);
3164 agent.startpos.X = crossedBorder.BorderLine.Z - 1;
3165 }
3163 3166
3164 if (agent.startpos.Y > (int)Constants.RegionSize - 1) 3167 if (TestBorderCross(agent.startpos, Cardinals.N))
3165 agent.startpos.Y = (int)Constants.RegionSize - 1; 3168 {
3169 Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.N);
3170 agent.startpos.Y = crossedBorder.BorderLine.Z - 1;
3171 }
3166 3172
3167 // Honor parcel landing type and position. 3173 // Honor parcel landing type and position.
3168 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 3174 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);