aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-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 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
3140 3140
3141 if (!agent.child) 3141 if (!agent.child)
3142 { 3142 {
3143 if (agent.startpos.X > (int)Constants.RegionSize - 1) 3143 if (TestBorderCross(agent.startpos,Cardinals.E))
3144 agent.startpos.X = (int)Constants.RegionSize - 1; 3144 {
3145 Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.E);
3146 agent.startpos.X = crossedBorder.BorderLine.Z - 1;
3147 }
3145 3148
3146 if (agent.startpos.Y > (int)Constants.RegionSize - 1) 3149 if (TestBorderCross(agent.startpos, Cardinals.N))
3147 agent.startpos.Y = (int)Constants.RegionSize - 1; 3150 {
3151 Border crossedBorder = GetCrossedBorder(agent.startpos, Cardinals.N);
3152 agent.startpos.Y = crossedBorder.BorderLine.Z - 1;
3153 }
3148 3154
3149 // Honor parcel landing type and position. 3155 // Honor parcel landing type and position.
3150 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 3156 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);