aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2010-07-19 14:36:53 +0100
committerDiva Canto2010-07-20 13:25:17 -0700
commit251740815fe39b99751aac5a6eedc7d4dc5bcbff (patch)
tree963ac76a916e4ff83fc2968eeeec4b7abaa7ea1b /OpenSim
parentAllow use of old angle rules PSYS_SRC_INNERANGLE and PSYS_SRC_OUTERANGLE in l... (diff)
downloadopensim-SC_OLD-251740815fe39b99751aac5a6eedc7d4dc5bcbff.zip
opensim-SC_OLD-251740815fe39b99751aac5a6eedc7d4dc5bcbff.tar.gz
opensim-SC_OLD-251740815fe39b99751aac5a6eedc7d4dc5bcbff.tar.bz2
opensim-SC_OLD-251740815fe39b99751aac5a6eedc7d4dc5bcbff.tar.xz
Revert "Thank you, Snoopy, for a patch to reduce sim script startup CPU usage"
This reverts commit c404c5fb5405eac24cc8b7cd402eb8d8fb0ff0cf.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs22
1 files changed, 10 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 3a8f168..866bb6e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -31,7 +31,6 @@ using System.IO;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections; 32using System.Collections;
33using System.Reflection; 33using System.Reflection;
34using System.Threading;
35using OpenMetaverse; 34using OpenMetaverse;
36using log4net; 35using log4net;
37using OpenSim.Framework; 36using OpenSim.Framework;
@@ -201,7 +200,6 @@ namespace OpenSim.Region.Framework.Scenes
201 if ((int)InventoryType.LSL == item.InvType) 200 if ((int)InventoryType.LSL == item.InvType)
202 { 201 {
203 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); 202 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
204 Thread.Sleep(10); // workaround for Mono cpu utilization > 100% bug
205 } 203 }
206 } 204 }
207 } 205 }
@@ -259,7 +257,7 @@ namespace OpenSim.Region.Framework.Scenes
259 // m_log.InfoFormat( 257 // m_log.InfoFormat(
260 // "[PRIM INVENTORY]: " + 258 // "[PRIM INVENTORY]: " +
261 // "Starting script {0}, {1} in prim {2}, {3}", 259 // "Starting script {0}, {1} in prim {2}, {3}",
262 // item.Name, item.ItemID, m_part.Name, m_part.UUID); 260 // item.Name, item.ItemID, Name, UUID);
263 261
264 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) 262 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
265 return; 263 return;
@@ -295,20 +293,20 @@ namespace OpenSim.Region.Framework.Scenes
295 } 293 }
296 else 294 else
297 { 295 {
296 if (m_part.ParentGroup.m_savedScriptState != null)
297 RestoreSavedScriptState(item.OldItemID, item.ItemID);
298
298 lock (m_items) 299 lock (m_items)
299 { 300 {
300 if (m_part.ParentGroup.m_savedScriptState != null)
301 RestoreSavedScriptState(item.OldItemID, item.ItemID);
302
303 m_items[item.ItemID].PermsMask = 0; 301 m_items[item.ItemID].PermsMask = 0;
304 m_items[item.ItemID].PermsGranter = UUID.Zero; 302 m_items[item.ItemID].PermsGranter = UUID.Zero;
305
306 string script = Utils.BytesToString(asset.Data);
307 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
308 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
309 m_part.ParentGroup.AddActiveScriptCount(1);
310 m_part.ScheduleFullUpdate();
311 } 303 }
304
305 string script = Utils.BytesToString(asset.Data);
306 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
307 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
308 m_part.ParentGroup.AddActiveScriptCount(1);
309 m_part.ScheduleFullUpdate();
312 } 310 }
313 } 311 }
314 } 312 }