Remove race conditions from where SP.AbsolutePosition could change between the various property checks.
parent
42bb122232
commit
bafa82eb12
|
@ -525,16 +525,13 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="avatar"></param>
|
/// <param name="avatar"></param>
|
||||||
public void EventManagerOnClientMovement(ScenePresence avatar)
|
public void EventManagerOnClientMovement(ScenePresence avatar)
|
||||||
//
|
|
||||||
{
|
{
|
||||||
ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
|
Vector3 pos = avatar.AbsolutePosition;
|
||||||
|
ILandObject over = GetLandObject(pos.X, pos.Y);
|
||||||
if (over != null)
|
if (over != null)
|
||||||
{
|
{
|
||||||
if (!over.IsRestrictedFromLand(avatar.UUID) && (!over.IsBannedFromLand(avatar.UUID) || avatar.AbsolutePosition.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT))
|
if (!over.IsRestrictedFromLand(avatar.UUID) && (!over.IsBannedFromLand(avatar.UUID) || pos.Z >= LandChannel.BAN_LINE_SAFETY_HIEGHT))
|
||||||
{
|
avatar.lastKnownAllowedPosition = pos;
|
||||||
avatar.lastKnownAllowedPosition =
|
|
||||||
new Vector3(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y, avatar.AbsolutePosition.Z);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue