aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs34
1 files changed, 34 insertions, 0 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