diff options
author | Melanie | 2009-11-23 04:24:58 +0000 |
---|---|---|
committer | Melanie | 2009-11-23 04:24:58 +0000 |
commit | df121a7cd065cc067818f6a39a44ddaaab647fec (patch) | |
tree | 5cc0e157ff3aefad066c07a1ebea2ae4b1ebdbe4 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | * Adds a modicum of additional checking to the Inventory Service (MySQL only) (diff) | |
download | opensim-SC_OLD-df121a7cd065cc067818f6a39a44ddaaab647fec.zip opensim-SC_OLD-df121a7cd065cc067818f6a39a44ddaaab647fec.tar.gz opensim-SC_OLD-df121a7cd065cc067818f6a39a44ddaaab647fec.tar.bz2 opensim-SC_OLD-df121a7cd065cc067818f6a39a44ddaaab647fec.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 5058457..4ffa1a2 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) |