aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a430b1e..f444e51 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3470,6 +3470,49 @@ namespace OpenSim.Region.Framework.Scenes
3470 agent.startpos.Y = crossedBorder.BorderLine.Z - 1; 3470 agent.startpos.Y = crossedBorder.BorderLine.Z - 1;
3471 } 3471 }
3472 3472
3473 //Mitigate http://opensimulator.org/mantis/view.php?id=3522
3474 // Check if start position is outside of region
3475 // If it is, check the Z start position also.. if not, leave it alone.
3476 if (BordersLocked)
3477 {
3478 lock (EastBorders)
3479 {
3480 if (agent.startpos.X > EastBorders[0].BorderLine.Z)
3481 {
3482 m_log.Warn("FIX AGENT POSITION");
3483 agent.startpos.X = EastBorders[0].BorderLine.Z * 0.5f;
3484 if (agent.startpos.Z > 720)
3485 agent.startpos.Z = 720;
3486 }
3487 }
3488 lock (NorthBorders)
3489 {
3490 if (agent.startpos.Y > NorthBorders[0].BorderLine.Z)
3491 {
3492 m_log.Warn("FIX Agent POSITION");
3493 agent.startpos.Y = NorthBorders[0].BorderLine.Z * 0.5f;
3494 if (agent.startpos.Z > 720)
3495 agent.startpos.Z = 720;
3496 }
3497 }
3498 }
3499 else
3500 {
3501 if (agent.startpos.X > EastBorders[0].BorderLine.Z)
3502 {
3503 m_log.Warn("FIX AGENT POSITION");
3504 agent.startpos.X = EastBorders[0].BorderLine.Z * 0.5f;
3505 if (agent.startpos.Z > 720)
3506 agent.startpos.Z = 720;
3507 }
3508 if (agent.startpos.Y > NorthBorders[0].BorderLine.Z)
3509 {
3510 m_log.Warn("FIX Agent POSITION");
3511 agent.startpos.Y = NorthBorders[0].BorderLine.Z * 0.5f;
3512 if (agent.startpos.Z > 720)
3513 agent.startpos.Z = 720;
3514 }
3515 }
3473 // Honor parcel landing type and position. 3516 // Honor parcel landing type and position.
3474 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 3517 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3475 if (land != null) 3518 if (land != null)