aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-08-26 18:25:14 +0100
committerJustin Clark-Casey (justincc)2014-08-26 18:25:14 +0100
commitbafa82eb12070279090b76fb6d38fda1c29ab859 (patch)
tree8bab6a38b85ca9fc43c32ba8e99adc58523a76bb /OpenSim/Region/CoreModules
parentFix frame times when updating scene on timer. (diff)
downloadopensim-SC_OLD-bafa82eb12070279090b76fb6d38fda1c29ab859.zip
opensim-SC_OLD-bafa82eb12070279090b76fb6d38fda1c29ab859.tar.gz
opensim-SC_OLD-bafa82eb12070279090b76fb6d38fda1c29ab859.tar.bz2
opensim-SC_OLD-bafa82eb12070279090b76fb6d38fda1c29ab859.tar.xz
Remove race conditions from where SP.AbsolutePosition could change between the various property checks.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 55ef61d..11b079f 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -525,16 +525,13 @@ namespace OpenSim.Region.CoreModules.World.Land
525 /// </summary> 525 /// </summary>
526 /// <param name="avatar"></param> 526 /// <param name="avatar"></param>
527 public void EventManagerOnClientMovement(ScenePresence avatar) 527 public void EventManagerOnClientMovement(ScenePresence avatar)
528 //
529 { 528 {
530 ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); 529 Vector3 pos = avatar.AbsolutePosition;
530 ILandObject over = GetLandObject(pos.X, pos.Y);
531 if (over != null) 531 if (over != null)
532 { 532 {
533 if (!over.IsRestrictedFromLand(avatar.UUID) && (!over.IsBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT)) 533 if (!over.IsRestrictedFromLand(avatar.UUID) && (!over.IsBannedFromLand(avatar.UUID) || pos.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT))
534 { 534 avatar.lastKnownAllowedPosition = pos;
535 avatar.lastKnownAllowedPosition =
536 new Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
537 }
538 } 535 }
539 } 536 }
540 537