aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorUbitUmarov2019-10-11 00:01:59 +0100
committerUbitUmarov2019-10-11 00:01:59 +0100
commit2c1909a873b7895e725d39d67bae4dac9873b1d2 (patch)
treeb211e05ab306ef6c35bf89edf50e2675afd55527 /OpenSim/Region/ScriptEngine/Shared/Api
parentupdate livomv (diff)
downloadopensim-SC-2c1909a873b7895e725d39d67bae4dac9873b1d2.zip
opensim-SC-2c1909a873b7895e725d39d67bae4dac9873b1d2.tar.gz
opensim-SC-2c1909a873b7895e725d39d67bae4dac9873b1d2.tar.bz2
opensim-SC-2c1909a873b7895e725d39d67bae4dac9873b1d2.tar.xz
add osResetAllScripts(LSL_Integer AllLinkset). use with care
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs34
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs4
4 files changed, 41 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 4d1ccb7..f0f6781 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -5560,5 +5560,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5560 5560
5561 return LSL_Rotation.Slerp(a, b, amount); 5561 return LSL_Rotation.Slerp(a, b, amount);
5562 } 5562 }
5563
5564 public void osResetAllScripts(LSL_Integer linkset)
5565 {
5566 UUID me = m_item.ItemID;
5567 List<TaskInventoryItem> scripts = new List<TaskInventoryItem>();
5568
5569 if(linkset != 0)
5570 {
5571 SceneObjectGroup sog = m_host.ParentGroup;
5572 if(sog.inTransit || sog.IsDeleted)
5573 return;
5574
5575 SceneObjectPart[] parts = sog.Parts;
5576 for (int i = 0; i < parts.Length; i++)
5577 {
5578 scripts.AddRange(parts[i].Inventory.GetInventoryItems(InventoryType.LSL));
5579 }
5580 }
5581 else
5582 scripts.AddRange(m_host.Inventory.GetInventoryItems(InventoryType.LSL));
5583
5584 foreach(TaskInventoryItem script in scripts)
5585 {
5586 if(script.ItemID == me)
5587 continue;
5588 m_ScriptEngine.ResetScript(script.ItemID);
5589 }
5590
5591 if (m_UrlModule != null)
5592 m_UrlModule.ScriptRemoved(me);
5593
5594 m_ScriptEngine.ApiResetScript(me);
5595
5596 }
5563 } 5597 }
5564} \ No newline at end of file 5598} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 369b361..afbbe6f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -556,5 +556,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
556 LSL_Key osGetLastChangedEventKey(); 556 LSL_Key osGetLastChangedEventKey();
557 LSL_Float osGetPSTWallclock(); 557 LSL_Float osGetPSTWallclock();
558 LSL_Rotation osSlerp(LSL_Rotation a, LSL_Rotation b, LSL_Float amount); 558 LSL_Rotation osSlerp(LSL_Rotation a, LSL_Rotation b, LSL_Float amount);
559
560 void osResetAllScripts(LSL_Integer AllLinkset);
559 } 561 }
560} 562}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 7edda58..e1c421f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
35 public partial class ScriptBaseClass 35 public partial class ScriptBaseClass
36 { 36 {
37 // SCRIPTS CONSTANTS 37 // SCRIPTS CONSTANTS
38 public static readonly LSLInteger OS_APIVERSION = 8; 38 public static readonly LSLInteger OS_APIVERSION = 9;
39 39
40 public static readonly LSLInteger TRUE = 1; 40 public static readonly LSLInteger TRUE = 1;
41 public static readonly LSLInteger FALSE = 0; 41 public static readonly LSLInteger FALSE = 0;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 866a955..e13b6b0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -1412,5 +1412,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1412 return m_OSSL_Functions.osSlerp(a, b, amount); 1412 return m_OSSL_Functions.osSlerp(a, b, amount);
1413 } 1413 }
1414 1414
1415 public void osResetAllScripts(LSL_Integer allLinkSet)
1416 {
1417 m_OSSL_Functions.osResetAllScripts(allLinkSet);
1418 }
1415 } 1419 }
1416} 1420}