aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-11-22 20:21:33 -0500
committerTeravus Ovares (Dan Olivares)2009-11-22 20:21:33 -0500
commit0ff3c28f903f38f5bbc681c9ba9f810ae25dbd8f (patch)
tree296f1504c92373c1c041a6d4462a6e32472d731e /OpenSim
parent* The client prevents the avatar from landing if the avatar is going above an... (diff)
downloadopensim-SC_OLD-0ff3c28f903f38f5bbc681c9ba9f810ae25dbd8f.zip
opensim-SC_OLD-0ff3c28f903f38f5bbc681c9ba9f810ae25dbd8f.tar.gz
opensim-SC_OLD-0ff3c28f903f38f5bbc681c9ba9f810ae25dbd8f.tar.bz2
opensim-SC_OLD-0ff3c28f903f38f5bbc681c9ba9f810ae25dbd8f.tar.xz
* This doesn't fix mantis 3522, but it should mitigate it.
* If the start position is outside of the region on the X and Y, put the user in the center of the region and then damp the Z position at 720 if necessary. If the start position is not outside of the region on the X or Y, then don't check the Z.
Diffstat (limited to 'OpenSim')
-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)