aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-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 }