diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 32a2deb..fd729d6 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2771,13 +2771,11 @@ 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) | 2774 | private bool scriptDanger(SceneObjectPart part,LLVector3 pos) |
2775 | { | 2775 | { |
2776 | SceneObjectPart part = GetSceneObjectPart(localID); | 2776 | ILandObject parcel = LandChannel.getLandObject(pos.X, pos.Y); |
2777 | if (part != null) | 2777 | if (part != null) |
2778 | { | 2778 | { |
2779 | LLVector3 pos = part.GetWorldPosition(); | ||
2780 | ILandObject parcel = LandChannel.getLandObject(pos.X, pos.Y); | ||
2781 | if (parcel != null) | 2779 | if (parcel != null) |
2782 | { | 2780 | { |
2783 | if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0) | 2781 | if ((parcel.landData.landFlags & (uint)Parcel.ParcelFlags.AllowOtherScripts) != 0) |
@@ -2809,7 +2807,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2809 | } | 2807 | } |
2810 | else | 2808 | else |
2811 | { | 2809 | { |
2812 | 2810 | ||
2813 | if (pos.X > 0f && pos.X < Constants.RegionSize && pos.Y > 0f && pos.Y < Constants.RegionSize) | 2811 | if (pos.X > 0f && pos.X < Constants.RegionSize && pos.Y > 0f && pos.Y < Constants.RegionSize) |
2814 | { | 2812 | { |
2815 | // The only time parcel != null when an object is inside a region is when | 2813 | // The only time parcel != null when an object is inside a region is when |
@@ -2822,6 +2820,33 @@ namespace OpenSim.Region.Environment.Scenes | |||
2822 | return false; | 2820 | return false; |
2823 | } | 2821 | } |
2824 | } | 2822 | } |
2823 | } | ||
2824 | else | ||
2825 | { | ||
2826 | return false; | ||
2827 | } | ||
2828 | } | ||
2829 | public bool scriptDanger(uint localID, LLVector3 pos) | ||
2830 | { | ||
2831 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
2832 | if (part != null) | ||
2833 | { | ||
2834 | return scriptDanger(part, pos); | ||
2835 | } | ||
2836 | else | ||
2837 | { | ||
2838 | return false; | ||
2839 | } | ||
2840 | } | ||
2841 | |||
2842 | public bool pipeEventsForScript(uint localID) | ||
2843 | { | ||
2844 | |||
2845 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
2846 | if (part != null) | ||
2847 | { | ||
2848 | LLVector3 pos = part.GetWorldPosition(); | ||
2849 | return scriptDanger(part, pos); | ||
2825 | 2850 | ||
2826 | } | 2851 | } |
2827 | else | 2852 | else |