aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs35
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs2
4 files changed, 44 insertions, 10 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
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
index 5d33294..7f41251 100644
--- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
@@ -1421,9 +1421,9 @@ namespace OpenSim.Region.ScriptEngine.Common
1421 return m_LSL_Functions.llDumpList2String(src, seperator); 1421 return m_LSL_Functions.llDumpList2String(src, seperator);
1422 } 1422 }
1423 1423
1424 public void llScriptDanger(LSL_Types.Vector3 pos) 1424 public int llScriptDanger(LSL_Types.Vector3 pos)
1425 { 1425 {
1426 m_LSL_Functions.llScriptDanger(pos); 1426 return m_LSL_Functions.llScriptDanger(pos);
1427 } 1427 }
1428 1428
1429 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) 1429 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel)
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index fb436c7..41c3956 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -3693,10 +3693,19 @@ namespace OpenSim.Region.ScriptEngine.Common
3693 return ret; 3693 return ret;
3694 } 3694 }
3695 3695
3696 public void llScriptDanger(LSL_Types.Vector3 pos) 3696 public int llScriptDanger(LSL_Types.Vector3 pos)
3697 { 3697 {
3698 m_host.AddScriptLPS(1); 3698 m_host.AddScriptLPS(1);
3699 NotImplemented("llScriptDanger"); 3699 bool result = World.scriptDanger(m_host.LocalId, new LLVector3((float)pos.x, (float)pos.y, (float)pos.z));
3700 if (result)
3701 {
3702 return 1;
3703 }
3704 else
3705 {
3706 return 0;
3707 }
3708
3700 } 3709 }
3701 3710
3702 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) 3711 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel)
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
index fa957bb..a74340b 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
@@ -473,7 +473,7 @@ namespace OpenSim.Region.ScriptEngine.Common
473 // 473 //
474 string llDumpList2String(LSL_Types.list src, string seperator); 474 string llDumpList2String(LSL_Types.list src, string seperator);
475 //wiki: integer llScriptDanger(vector pos) 475 //wiki: integer llScriptDanger(vector pos)
476 void llScriptDanger(LSL_Types.Vector3 pos); 476 int llScriptDanger(LSL_Types.Vector3 pos);
477 //wiki: llDialog( key avatar, string message, list buttons, integer chat_channel ) 477 //wiki: llDialog( key avatar, string message, list buttons, integer chat_channel )
478 void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel); 478 void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel);
479 //wiki: llVolumeDetect(integer detect) 479 //wiki: llVolumeDetect(integer detect)