aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-06-24 03:30:11 +0100
committerMelanie2010-06-24 03:30:11 +0100
commite93853623bd2744f89c6c508bef2a3eff3a6aaf9 (patch)
tree96cec1ef37a393f9e16cd604e61566936fba4d83 /OpenSim/Region
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentMove loading of parcels to before script start. Scripts using parcel functions (diff)
downloadopensim-SC_OLD-e93853623bd2744f89c6c508bef2a3eff3a6aaf9.zip
opensim-SC_OLD-e93853623bd2744f89c6c508bef2a3eff3a6aaf9.tar.gz
opensim-SC_OLD-e93853623bd2744f89c6c508bef2a3eff3a6aaf9.tar.bz2
opensim-SC_OLD-e93853623bd2744f89c6c508bef2a3eff3a6aaf9.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs21
2 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index f053911..ae942f9 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -396,18 +396,20 @@ namespace OpenSim
396 scene.SnmpService.BootInfo("Grid Registration done", scene); 396 scene.SnmpService.BootInfo("Grid Registration done", scene);
397 } 397 }
398 398
399 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
400 scene.EventManager.TriggerParcelPrimCountUpdate();
401
399 // We need to do this after we've initialized the 402 // We need to do this after we've initialized the
400 // scripting engines. 403 // scripting engines.
401 scene.CreateScriptInstances(); 404 scene.CreateScriptInstances();
402 405
403 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
404 scene.EventManager.TriggerParcelPrimCountUpdate();
405
406 if (scene.SnmpService != null) 406 if (scene.SnmpService != null)
407 { 407 {
408 scene.SnmpService.BootInfo("ScriptEngine started", scene); 408 scene.SnmpService.BootInfo("ScriptEngine started", scene);
409 } 409 }
410 410
411=======
412>>>>>>> master:OpenSim/Region/Application/OpenSimBase.cs
411 m_sceneManager.Add(scene); 413 m_sceneManager.Add(scene);
412 414
413 if (m_autoCreateClientStack) 415 if (m_autoCreateClientStack)
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;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections; 32using System.Collections;
33using System.Reflection; 33using System.Reflection;
34using System.Threading;
34using OpenMetaverse; 35using OpenMetaverse;
35using log4net; 36using log4net;
36using OpenSim.Framework; 37using 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 }