aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-06 08:03:22 +0000
committerTeravus Ovares2008-02-06 08:03:22 +0000
commit9cd9e90e7f174ab0d84af2df6aff7d23b3493552 (patch)
treeba54a04de7b6f2a64ff0edd6db8d59c4717552c0 /OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
parentRevert color console changes until a cross-platform method is found. (diff)
downloadopensim-SC_OLD-9cd9e90e7f174ab0d84af2df6aff7d23b3493552.zip
opensim-SC_OLD-9cd9e90e7f174ab0d84af2df6aff7d23b3493552.tar.gz
opensim-SC_OLD-9cd9e90e7f174ab0d84af2df6aff7d23b3493552.tar.bz2
opensim-SC_OLD-9cd9e90e7f174ab0d84af2df6aff7d23b3493552.tar.xz
* 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)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs22
1 files changed, 22 insertions, 0 deletions
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
125 } 125 }
126 } 126 }
127 } 127 }
128
129 public void StopScripts()
130 {
131 lock (m_taskInventory)
132 {
133 foreach (TaskInventoryItem item in m_taskInventory.Values)
134 {
135 if (10 == item.Type)
136 {
137 StopScript(item.ItemID);
138 }
139 }
140 }
141 }
128 142
129 /// <summary> 143 /// <summary>
130 /// Start a script which is in this prim's inventory. 144 /// Start a script which is in this prim's inventory.
@@ -144,6 +158,7 @@ namespace OpenSim.Region.Environment.Scenes
144 { 158 {
145 string script = Helpers.FieldToUTF8String(rezAsset.Data); 159 string script = Helpers.FieldToUTF8String(rezAsset.Data);
146 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script); 160 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script);
161
147 } 162 }
148 else 163 else
149 { 164 {
@@ -167,6 +182,7 @@ namespace OpenSim.Region.Environment.Scenes
167 if (m_taskInventory.ContainsKey(itemId)) 182 if (m_taskInventory.ContainsKey(itemId))
168 { 183 {
169 StartScript(m_taskInventory[itemId]); 184 StartScript(m_taskInventory[itemId]);
185 m_parentGroup.AddActiveScriptCount(1);
170 } 186 }
171 else 187 else
172 { 188 {
@@ -187,6 +203,7 @@ namespace OpenSim.Region.Environment.Scenes
187 if (m_taskInventory.ContainsKey(itemId)) 203 if (m_taskInventory.ContainsKey(itemId))
188 { 204 {
189 m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId); 205 m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId);
206 m_parentGroup.AddActiveScriptCount(-1);
190 } 207 }
191 else 208 else
192 { 209 {
@@ -295,6 +312,11 @@ namespace OpenSim.Region.Environment.Scenes
295 return false; 312 return false;
296 } 313 }
297 314
315 public void AddScriptLPS(int count)
316 {
317 m_parentGroup.AddScriptLPS(count);
318 }
319
298 /// <summary> 320 /// <summary>
299 /// Remove an item from this prim's inventory 321 /// Remove an item from this prim's inventory
300 /// </summary> 322 /// </summary>