From 9cd9e90e7f174ab0d84af2df6aff7d23b3493552 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 6 Feb 2008 08:03:22 +0000 Subject: * Added Active Scripts to report the number of scripts running to Sim Stats * Added Script Performance to report the number of functions run per second to Sim Stats. * Removed a few warnings (@.@ up to 50 now) --- .../Scenes/SceneObjectPart.Inventory.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index d9ee94c..e8ffe0e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -125,6 +125,20 @@ namespace OpenSim.Region.Environment.Scenes } } } + + public void StopScripts() + { + lock (m_taskInventory) + { + foreach (TaskInventoryItem item in m_taskInventory.Values) + { + if (10 == item.Type) + { + StopScript(item.ItemID); + } + } + } + } /// /// Start a script which is in this prim's inventory. @@ -144,6 +158,7 @@ namespace OpenSim.Region.Environment.Scenes { string script = Helpers.FieldToUTF8String(rezAsset.Data); m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script); + } else { @@ -167,6 +182,7 @@ namespace OpenSim.Region.Environment.Scenes if (m_taskInventory.ContainsKey(itemId)) { StartScript(m_taskInventory[itemId]); + m_parentGroup.AddActiveScriptCount(1); } else { @@ -187,6 +203,7 @@ namespace OpenSim.Region.Environment.Scenes if (m_taskInventory.ContainsKey(itemId)) { m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId); + m_parentGroup.AddActiveScriptCount(-1); } else { @@ -295,6 +312,11 @@ namespace OpenSim.Region.Environment.Scenes return false; } + public void AddScriptLPS(int count) + { + m_parentGroup.AddScriptLPS(count); + } + /// /// Remove an item from this prim's inventory /// -- cgit v1.1