diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 52 |
1 files changed, 42 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 4e7c76f..a3066e7 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -423,17 +423,49 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
423 | SendLandUpdate(avatar, false); | 423 | SendLandUpdate(avatar, false); |
424 | } | 424 | } |
425 | 425 | ||
426 | public void EventManagerOnSignificantClientMovement(IClientAPI remote_client) | 426 | public void EventManagerOnSignificantClientMovement(ScenePresence clientAvatar) |
427 | { | 427 | { |
428 | ScenePresence clientAvatar = m_scene.GetScenePresence(remote_client.AgentId); | 428 | SendLandUpdate(clientAvatar); |
429 | 429 | SendOutNearestBanLine(clientAvatar.ControllingClient); | |
430 | if (clientAvatar != null) | 430 | ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y); |
431 | if (parcel != null) | ||
431 | { | 432 | { |
432 | SendLandUpdate(clientAvatar); | 433 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && |
433 | SendOutNearestBanLine(remote_client); | 434 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) |
434 | ILandObject parcel = GetLandObject(clientAvatar.AbsolutePosition.X, clientAvatar.AbsolutePosition.Y); | 435 | { |
435 | if (parcel != null) | 436 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, |
436 | EnforceBans(parcel, clientAvatar); | 437 | m_scene.RegionInfo.RegionID); |
438 | //They are going under the safety line! | ||
439 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) | ||
440 | { | ||
441 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown = false; | ||
442 | } | ||
443 | } | ||
444 | else if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && | ||
445 | parcel.IsBannedFromLand(clientAvatar.UUID)) | ||
446 | { | ||
447 | //once we've sent the message once, keep going toward the target until we are done | ||
448 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) | ||
449 | { | ||
450 | SendYouAreBannedNotice(clientAvatar); | ||
451 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | ||
452 | } | ||
453 | } | ||
454 | else if (parcel.IsRestrictedFromLand(clientAvatar.UUID)) | ||
455 | { | ||
456 | //once we've sent the message once, keep going toward the target until we are done | ||
457 | if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId)) | ||
458 | { | ||
459 | SendYouAreRestrictedNotice(clientAvatar); | ||
460 | ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar)); | ||
461 | } | ||
462 | } | ||
463 | else | ||
464 | { | ||
465 | //when we are finally in a safe place, lets release the forced position lock | ||
466 | forcedPosition.Remove(clientAvatar.ControllingClient.AgentId); | ||
467 | } | ||
468 | EnforceBans(parcel, clientAvatar); | ||
437 | } | 469 | } |
438 | } | 470 | } |
439 | 471 | ||
@@ -665,7 +697,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
665 | // Corner case. If an autoreturn happens during sim startup | 697 | // Corner case. If an autoreturn happens during sim startup |
666 | // we will come here with the list uninitialized | 698 | // we will come here with the list uninitialized |
667 | // | 699 | // |
668 | int landId = m_landIDList[x, y]; | 700 | // int landId = m_landIDList[x, y]; |
669 | 701 | ||
670 | // if (landId == 0) | 702 | // if (landId == 0) |
671 | // m_log.DebugFormat( | 703 | // m_log.DebugFormat( |