From b7155f565110683107f5a94684c2669f5ff71aaf Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 15 Dec 2015 18:32:02 +0000 Subject: [PATCH] fix typo --- .../CoreModules/World/Land/LandChannel.cs | 3 ++- .../World/Land/LandManagementModule.cs | 17 +++++++---------- .../Region/CoreModules/World/Land/LandObject.cs | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index 378826d751..9de88d9d5b 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs @@ -37,9 +37,10 @@ namespace OpenSim.Region.CoreModules.World.Land { #region Constants + public const float BAN_LINE_SAFETY_HEIGHT = 100; //Land types set with flags in ParcelOverlay. //Only one of these can be used. - public const float BAN_LINE_SAFETY_HIEGHT = 100; + //RequestResults (I think these are right, they seem to work): public const int LAND_RESULT_MULTIPLE = 1; // The request they made contained more than a single peice of land diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 6686362f96..e9a6abb2e8 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -355,13 +355,10 @@ namespace OpenSim.Region.CoreModules.World.Land if (!position.HasValue) return; -// land should have no word on avatar physics -// bool isFlying = avatar.PhysicsActor.Flying; -// avatar.RemoveFromPhysicalScene(); + avatar.AbsolutePosition = position.Value; + avatar.lastKnownAllowedPosition = position.Value; + avatar.Velocity = Vector3.Zero; - avatar.AbsolutePosition = (Vector3)position; - -// avatar.AddToPhysicalScene(isFlying); } public void SendYouAreRestrictedNotice(ScenePresence avatar) @@ -462,7 +459,7 @@ namespace OpenSim.Region.CoreModules.World.Land ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y); if (parcel != null) { - if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && + if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HEIGHT && clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) { EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, @@ -473,7 +470,7 @@ namespace OpenSim.Region.CoreModules.World.Land clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false; } } - else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && + else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HEIGHT && parcel.IsBannedFromLand(clientAvatar.UUID)) { //once we've sent the message once, keep going toward the target until we are done @@ -511,7 +508,7 @@ namespace OpenSim.Region.CoreModules.World.Land ILandObject over = GetLandObject(pos.X, pos.Y); if (over != null) { - if (!over.IsRestrictedFromLand(avatar.UUID) && (!over.IsBannedFromLand(avatar.UUID) || pos.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT)) + if (!over.IsRestrictedFromLand(avatar.UUID) && (!over.IsBannedFromLand(avatar.UUID) || pos.Z >= LandChannel.BAN_LINE_SAFETY_HEIGHT)) avatar.lastKnownAllowedPosition = pos; } } @@ -2251,7 +2248,7 @@ namespace OpenSim.Region.CoreModules.World.Land public void EnforceBans(ILandObject land, ScenePresence avatar) { - if (avatar.AbsolutePosition.Z > LandChannel.BAN_LINE_SAFETY_HIEGHT) + if (avatar.AbsolutePosition.Z > LandChannel.BAN_LINE_SAFETY_HEIGHT) return; if (land.IsEitherBannedOrRestricted(avatar.UUID)) diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 378e996bed..4afceab202 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs @@ -610,7 +610,7 @@ namespace OpenSim.Region.CoreModules.World.Land public bool CanBeOnThisLand(UUID avatar, float posHeight) { - if (posHeight < LandChannel.BAN_LINE_SAFETY_HIEGHT && IsBannedFromLand(avatar)) + if (posHeight < LandChannel.BAN_LINE_SAFETY_HEIGHT && IsBannedFromLand(avatar)) { return false; }