diff options
author | Melanie | 2010-04-19 15:33:20 +0100 |
---|---|---|
committer | Melanie | 2010-04-19 15:33:20 +0100 |
commit | d2e4f2d376ae8b2cfc904e304e590f1fd229c906 (patch) | |
tree | d86654b51d6d15fbc001b3fba6f1d576a5d6993a | |
parent | And some more rez modes that weren't covered before (diff) | |
parent | Make script asset fetches synchronous. Script instantiation synchronization (diff) | |
download | opensim-SC-d2e4f2d376ae8b2cfc904e304e590f1fd229c906.zip opensim-SC-d2e4f2d376ae8b2cfc904e304e590f1fd229c906.tar.gz opensim-SC-d2e4f2d376ae8b2cfc904e304e590f1fd229c906.tar.bz2 opensim-SC-d2e4f2d376ae8b2cfc904e304e590f1fd229c906.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 61 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 2 |
2 files changed, 30 insertions, 33 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 0404422..04df35a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -295,38 +295,35 @@ namespace OpenSim.Region.Framework.Scenes | |||
295 | return; | 295 | return; |
296 | } | 296 | } |
297 | 297 | ||
298 | m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString(), this, delegate(string id, object sender, AssetBase asset) | 298 | AssetBase asset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString()); |
299 | { | 299 | if (null == asset) |
300 | if (null == asset) | 300 | { |
301 | { | 301 | string msg = String.Format("asset ID {0} could not be found", item.AssetID); |
302 | string msg = String.Format("asset ID {0} could not be found", item.AssetID); | 302 | StoreScriptError(item.ItemID, msg); |
303 | StoreScriptError(item.ItemID, msg); | 303 | m_log.ErrorFormat( |
304 | m_log.ErrorFormat( | 304 | "[PRIM INVENTORY]: " + |
305 | "[PRIM INVENTORY]: " + | 305 | "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", |
306 | "Couldn't start script {0}, {1} at {2} in {3} since {4}", | 306 | item.Name, item.ItemID, m_part.AbsolutePosition, |
307 | item.Name, item.ItemID, m_part.AbsolutePosition, | 307 | m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); |
308 | m_part.ParentGroup.Scene.RegionInfo.RegionName, msg); | 308 | } |
309 | } | 309 | else |
310 | else | 310 | { |
311 | { | 311 | if (m_part.ParentGroup.m_savedScriptState != null) |
312 | if (m_part.ParentGroup.m_savedScriptState != null) | 312 | RestoreSavedScriptState(item.OldItemID, item.ItemID); |
313 | RestoreSavedScriptState(item.OldItemID, item.ItemID); | 313 | |
314 | m_items.LockItemsForWrite(true); | 314 | lock (m_items) |
315 | m_items[item.ItemID].PermsMask = 0; | 315 | { |
316 | m_items[item.ItemID].PermsGranter = UUID.Zero; | 316 | m_items[item.ItemID].PermsMask = 0; |
317 | m_items.LockItemsForWrite(false); | 317 | m_items[item.ItemID].PermsGranter = UUID.Zero; |
318 | string script = Utils.BytesToString(asset.Data); | 318 | } |
319 | m_part.ParentGroup.Scene.EventManager.TriggerRezScript( | 319 | |
320 | m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); | 320 | string script = Utils.BytesToString(asset.Data); |
321 | StoreScriptErrors(item.ItemID, null); | 321 | m_part.ParentGroup.Scene.EventManager.TriggerRezScript( |
322 | m_part.ParentGroup.AddActiveScriptCount(1); | 322 | m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); |
323 | m_part.ScheduleFullUpdate(); | 323 | StoreScriptErrors(item.ItemID, null); |
324 | } | 324 | m_part.ParentGroup.AddActiveScriptCount(1); |
325 | }); | 325 | m_part.ScheduleFullUpdate(); |
326 | } | 326 | } |
327 | else | ||
328 | { | ||
329 | StoreScriptError(item.ItemID, "scripts disabled"); | ||
330 | } | 327 | } |
331 | } | 328 | } |
332 | 329 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 9ccc199..b348403 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
96 | private bool m_startedFromSavedState; | 96 | private bool m_startedFromSavedState; |
97 | private UUID m_CurrentStateHash; | 97 | private UUID m_CurrentStateHash; |
98 | private UUID m_RegionID; | 98 | private UUID m_RegionID; |
99 | private bool m_Suspended = true; | 99 | private bool m_Suspended = false; |
100 | 100 | ||
101 | private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> | 101 | private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> |
102 | m_LineMap; | 102 | m_LineMap; |