diff options
author | Teravus Ovares | 2008-04-22 09:28:58 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-22 09:28:58 +0000 |
commit | 809447ac321a795cfa34584b424ab0b6141e9268 (patch) | |
tree | 61638a11f1124331617e18d683343e623d49b192 /OpenSim/Region/Environment | |
parent | * Patch from Mic Bowman(cmickeyb) that implements llUnsit. Thanks Mic! (diff) | |
download | opensim-SC_OLD-809447ac321a795cfa34584b424ab0b6141e9268.zip opensim-SC_OLD-809447ac321a795cfa34584b424ab0b6141e9268.tar.gz opensim-SC_OLD-809447ac321a795cfa34584b424ab0b6141e9268.tar.bz2 opensim-SC_OLD-809447ac321a795cfa34584b424ab0b6141e9268.tar.xz |
* Implemented NoScript areas (without loosing script state).
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 6d8d481..32a2deb 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2771,6 +2771,65 @@ namespace OpenSim.Region.Environment.Scenes | |||
2771 | m_eventManager.TriggerOnScriptChangedEvent(localID, change); | 2771 | m_eventManager.TriggerOnScriptChangedEvent(localID, change); |
2772 | } | 2772 | } |
2773 | 2773 | ||
2774 | public bool pipeEventsForScript(uint localID) | ||
2775 | { | ||
2776 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
2777 | if (part != null) | ||
2778 | { | ||
2779 | LLVector3 pos = part.GetWorldPosition(); | ||
2780 | ILandObject parcel = LandChannel.getLandObject(pos.X, pos.Y); | ||
2781 | if (parcel != null) | ||
2782 | { | ||
2783 | if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0) | ||
2784 | { | ||
2785 | return true; | ||
2786 | } | ||
2787 | else if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowGroupScripts) != 0) | ||
2788 | { | ||
2789 | if (part.OwnerID == parcel.landData.ownerID || (parcel.landData.isGroupOwned && part.GroupID == parcel.landData.groupID) || PermissionsMngr.GenericEstatePermission(part.OwnerID)) | ||
2790 | { | ||
2791 | return true; | ||
2792 | } | ||
2793 | else | ||
2794 | { | ||
2795 | return false; | ||
2796 | } | ||
2797 | } | ||
2798 | else | ||
2799 | { | ||
2800 | if (part.OwnerID == parcel.landData.ownerID) | ||
2801 | { | ||
2802 | return true; | ||
2803 | } | ||
2804 | else | ||
2805 | { | ||
2806 | return false; | ||
2807 | } | ||
2808 | } | ||
2809 | } | ||
2810 | else | ||
2811 | { | ||
2812 | |||
2813 | if (pos.X > 0f && pos.X < Constants.RegionSize && pos.Y > 0f && pos.Y < Constants.RegionSize) | ||
2814 | { | ||
2815 | // The only time parcel != null when an object is inside a region is when | ||
2816 | // there is nothing behind the landchannel. IE, no land plugin loaded. | ||
2817 | return true; | ||
2818 | } | ||
2819 | else | ||
2820 | { | ||
2821 | // The object is outside of this region. Stop piping events to it. | ||
2822 | return false; | ||
2823 | } | ||
2824 | } | ||
2825 | |||
2826 | } | ||
2827 | else | ||
2828 | { | ||
2829 | return false; | ||
2830 | } | ||
2831 | } | ||
2832 | |||
2774 | #endregion | 2833 | #endregion |
2775 | 2834 | ||
2776 | #region InnerScene wrapper methods | 2835 | #region InnerScene wrapper methods |