diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index c3cdca8..5be71df 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -31,6 +31,7 @@ using System.IO; | |||
31 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
32 | using System.Collections; | 32 | using System.Collections; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using System.Threading; | ||
34 | using OpenMetaverse; | 35 | using OpenMetaverse; |
35 | using log4net; | 36 | using log4net; |
36 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
@@ -208,6 +209,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
208 | if ((int)InventoryType.LSL == item.InvType) | 209 | if ((int)InventoryType.LSL == item.InvType) |
209 | { | 210 | { |
210 | CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); | 211 | CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); |
212 | Thread.Sleep(10); // workaround for Mono cpu utilization > 100% bug | ||
211 | } | 213 | } |
212 | } | 214 | } |
213 | } | 215 | } |
@@ -268,7 +270,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
268 | // m_log.InfoFormat( | 270 | // m_log.InfoFormat( |
269 | // "[PRIM INVENTORY]: " + | 271 | // "[PRIM INVENTORY]: " + |
270 | // "Starting script {0}, {1} in prim {2}, {3}", | 272 | // "Starting script {0}, {1} in prim {2}, {3}", |
271 | // item.Name, item.ItemID, Name, UUID); | 273 | // item.Name, item.ItemID, m_part.Name, m_part.UUID); |
272 | 274 | ||
273 | if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) | 275 | if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) |
274 | { | 276 | { |
@@ -308,6 +310,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
308 | } | 310 | } |
309 | else | 311 | else |
310 | { | 312 | { |
313 | <<<<<<< HEAD:OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | ||
311 | if (m_part.ParentGroup.m_savedScriptState != null) | 314 | if (m_part.ParentGroup.m_savedScriptState != null) |
312 | RestoreSavedScriptState(item.OldItemID, item.ItemID); | 315 | RestoreSavedScriptState(item.OldItemID, item.ItemID); |
313 | 316 | ||
@@ -324,6 +327,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
324 | StoreScriptErrors(item.ItemID, null); | 327 | StoreScriptErrors(item.ItemID, null); |
325 | m_part.ParentGroup.AddActiveScriptCount(1); | 328 | m_part.ParentGroup.AddActiveScriptCount(1); |
326 | m_part.ScheduleFullUpdate(); | 329 | m_part.ScheduleFullUpdate(); |
330 | ======= | ||
331 | lock (m_items) | ||
332 | { | ||
333 | if (m_part.ParentGroup.m_savedScriptState != null) | ||
334 | RestoreSavedScriptState(item.OldItemID, item.ItemID); | ||
335 | |||
336 | m_items[item.ItemID].PermsMask = 0; | ||
337 | m_items[item.ItemID].PermsGranter = UUID.Zero; | ||
338 | |||
339 | string script = Utils.BytesToString(asset.Data); | ||
340 | m_part.ParentGroup.Scene.EventManager.TriggerRezScript( | ||
341 | m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); | ||
342 | m_part.ParentGroup.AddActiveScriptCount(1); | ||
343 | m_part.ScheduleFullUpdate(); | ||
344 | } | ||
345 | >>>>>>> master:OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | ||
327 | } | 346 | } |
328 | } | 347 | } |
329 | } | 348 | } |