diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 6a3c386..545183b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -699,42 +699,42 @@ namespace OpenSim.Region.Framework.Scenes | |||
699 | { | 699 | { |
700 | m_log.DebugFormat( | 700 | m_log.DebugFormat( |
701 | "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation {0} within {1}", | 701 | "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation {0} within {1}", |
702 | position, m_regionInfo.RegionName); | 702 | position, m_regionInfo.RegionName); |
703 | 703 | ||
704 | // Teleport within the same region | 704 | // Teleport within the same region |
705 | if (IsOutsideRegion(avatar.Scene, position) || position.Z < 0) | 705 | if (IsOutsideRegion(avatar.Scene, position) || position.Z < 0) |
706 | { | 706 | { |
707 | Vector3 emergencyPos = new Vector3(128, 128, 128); | 707 | Vector3 emergencyPos = new Vector3(128, 128, 128); |
708 | 708 | ||
709 | m_log.WarnFormat( | 709 | m_log.WarnFormat( |
710 | "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", | 710 | "[SCENE COMMUNICATION SERVICE]: RequestTeleportToLocation() was given an illegal position of {0} for avatar {1}, {2}. Substituting {3}", |
711 | position, avatar.Name, avatar.UUID, emergencyPos); | 711 | position, avatar.Name, avatar.UUID, emergencyPos); |
712 | position = emergencyPos; | 712 | position = emergencyPos; |
713 | } | 713 | } |
714 | 714 | ||
715 | Vector3 currentPos = avatar.AbsolutePosition; | 715 | Vector3 currentPos = avatar.AbsolutePosition; |
716 | ILandObject srcLand = m_scene.LandChannel.GetLandObject(currentPos.X, currentPos.Y); | 716 | ILandObject srcLand = m_scene.LandChannel.GetLandObject(currentPos.X, currentPos.Y); |
717 | ILandObject destLand = m_scene.LandChannel.GetLandObject(position.X, position.Y); | 717 | ILandObject destLand = m_scene.LandChannel.GetLandObject(position.X, position.Y); |
718 | if (srcLand != null && destLand != null && (teleportFlags & (uint)TeleportFlags.ViaLure) == 0 && (teleportFlags & (uint)TeleportFlags.ViaGodlikeLure) == 0) | 718 | if (srcLand != null && destLand != null && (teleportFlags & (uint)TeleportFlags.ViaLure) == 0 && (teleportFlags & (uint)TeleportFlags.ViaGodlikeLure) == 0) |
719 | { | 719 | { |
720 | if (srcLand.LandData.LocalID == destLand.LandData.LocalID) | 720 | if (srcLand.LandData.LocalID == destLand.LandData.LocalID) |
721 | { | 721 | { |
722 | //TPing within the same parcel. If the landing point is restricted, block the TP. | 722 | //TPing within the same parcel. If the landing point is restricted, block the TP. |
723 | //Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni. | 723 | //Don't restrict gods, estate managers, or land owners to the TP point. This behaviour mimics agni. |
724 | if (destLand.LandData.LandingType == (byte)1 && destLand.LandData.UserLocation != Vector3.Zero && avatar.GodLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(avatar.UUID) && destLand.LandData.OwnerID != avatar.UUID) | 724 | if (destLand.LandData.LandingType == (byte)1 && destLand.LandData.UserLocation != Vector3.Zero && avatar.GodLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(avatar.UUID) && destLand.LandData.OwnerID != avatar.UUID) |
725 | { | 725 | { |
726 | avatar.ControllingClient.SendAgentAlertMessage("Can't TP to the destination; landing point set.", false); | 726 | avatar.ControllingClient.SendAgentAlertMessage("Can't TP to the destination; landing point set.", false); |
727 | position = currentPos; | 727 | position = currentPos; |
728 | } | 728 | } |
729 | } | 729 | } |
730 | else | 730 | else |
731 | { | 731 | { |
732 | //Tping to a different parcel. Respect the landing point on the destination parcel. | 732 | //Tping to a different parcel. Respect the landing point on the destination parcel. |
733 | if (destLand.LandData.LandingType == (byte)1 && destLand.LandData.UserLocation != Vector3.Zero && avatar.GodLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(avatar.UUID) && destLand.LandData.OwnerID != avatar.UUID) | 733 | if (destLand.LandData.LandingType == (byte)1 && destLand.LandData.UserLocation != Vector3.Zero && avatar.GodLevel < 200 && !m_scene.RegionInfo.EstateSettings.IsEstateManager(avatar.UUID) && destLand.LandData.OwnerID != avatar.UUID) |
734 | { | 734 | { |
735 | position = destLand.LandData.UserLocation; | 735 | position = destLand.LandData.UserLocation; |
736 | } | 736 | } |
737 | } | 737 | } |
738 | } | 738 | } |
739 | 739 | ||
740 | // TODO: Get proper AVG Height | 740 | // TODO: Get proper AVG Height |