diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 69 |
1 files changed, 32 insertions, 37 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 63dec15..7554e12 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -470,53 +470,48 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
470 | SendLandUpdate(avatar, false); | 470 | SendLandUpdate(avatar, false); |
471 | } | 471 | } |
472 | 472 | ||
473 | public void EventManagerOnSignificantClientMovement(IClientAPI remote_client) | 473 | public void EventManagerOnSignificantClientMovement(ScenePresence clientAvatar) |
474 | { | 474 | { |
475 | ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId); | 475 | SendLandUpdate(clientAvatar); |
476 | 476 | SendOutNearestBanLine(clientAvatar.ControllingClient); | |
477 | if (clientAvatar != null) | 477 | ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y); |
478 | if (parcel != null) | ||
478 | { | 479 | { |
479 | SendLandUpdate(clientAvatar); | 480 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && |
480 | SendOutNearestBanLine(remote_client); | 481 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) |
481 | ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y); | ||
482 | if (parcel != null) | ||
483 | { | 482 | { |
484 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && | 483 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, |
485 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) | 484 | m_scene.RegionInfo.RegionID); |
485 | //They are going under the safety line! | ||
486 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) | ||
486 | { | 487 | { |
487 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, | 488 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false; |
488 | m_scene.RegionInfo.RegionID); | ||
489 | //They are going under the safety line! | ||
490 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) | ||
491 | { | ||
492 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false; | ||
493 | } | ||
494 | } | 489 | } |
495 | else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && | 490 | } |
496 | parcel.IsBannedFromLand(clientAvatar.UUID)) | 491 | else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && |
492 | parcel.IsBannedFromLand(clientAvatar.UUID)) | ||
493 | { | ||
494 | //once we've sent the message once, keep going toward the target until we are done | ||
495 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) | ||
497 | { | 496 | { |
498 | //once we've sent the message once, keep going toward the target until we are done | 497 | SendYouAreBannedNotice(clientAvatar); |
499 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) | 498 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); |
500 | { | ||
501 | SendYouAreBannedNotice(clientAvatar); | ||
502 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | ||
503 | } | ||
504 | } | 499 | } |
505 | else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) | 500 | } |
506 | { | 501 | else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) |
507 | //once we've sent the message once, keep going toward the target until we are done | 502 | { |
508 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) | 503 | //once we've sent the message once, keep going toward the target until we are done |
509 | { | 504 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) |
510 | SendYouAreRestrictedNotice(clientAvatar); | ||
511 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | ||
512 | } | ||
513 | } | ||
514 | else | ||
515 | { | 505 | { |
516 | //when we are finally in a safe place, lets release the forced position lock | 506 | SendYouAreRestrictedNotice(clientAvatar); |
517 | forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); | 507 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); |
518 | } | 508 | } |
519 | } | 509 | } |
510 | else | ||
511 | { | ||
512 | //when we are finally in a safe place, lets release the forced position lock | ||
513 | forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); | ||
514 | } | ||
520 | } | 515 | } |
521 | } | 516 | } |
522 | 517 | ||