diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 47450ed..9a71cd4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4633,9 +4633,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4633 | 4633 | ||
4634 | public Vector3? GetNearestAllowedPosition(ScenePresence avatar) | 4634 | public Vector3? GetNearestAllowedPosition(ScenePresence avatar) |
4635 | { | 4635 | { |
4636 | //simulate to make sure we have pretty up to date positions | ||
4637 | PhysicsScene.Simulate(0); | ||
4638 | |||
4639 | ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 4636 | ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
4640 | 4637 | ||
4641 | if (nearestParcel != null) | 4638 | if (nearestParcel != null) |
@@ -4662,12 +4659,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4662 | //Ultimate backup if we have no idea where they are | 4659 | //Ultimate backup if we have no idea where they are |
4663 | Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); | 4660 | Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); |
4664 | return avatar.lastKnownAllowedPosition; | 4661 | return avatar.lastKnownAllowedPosition; |
4665 | |||
4666 | } | 4662 | } |
4667 | 4663 | ||
4668 | //Go to the edge, this happens in teleporting to a region with no available parcels | 4664 | //Go to the edge, this happens in teleporting to a region with no available parcels |
4669 | Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); | 4665 | Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); |
4666 | |||
4670 | //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); | 4667 | //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); |
4668 | |||
4671 | return nearestRegionEdgePoint; | 4669 | return nearestRegionEdgePoint; |
4672 | } | 4670 | } |
4673 | 4671 | ||