From 1dd904b78e723af8cb4340415a8f41dcd1054541 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 5 Sep 2011 12:45:02 +0300 Subject: Delay loading scripts until the scene has finished loading --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 4700c3b..9dcd10a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -57,11 +57,11 @@ namespace OpenSim.Region.Framework.Scenes protected AsyncInventorySender m_asyncInventorySender; /// - /// Start all the scripts in the scene which should be started. + /// Creates all the scripts in the scene which should be started. /// public void CreateScriptInstances() { - m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); + m_log.Info("[PRIM INVENTORY]: Creating scripts in scene"); EntityBase[] entities = Entities.GetEntities(); foreach (EntityBase group in entities) @@ -74,6 +74,26 @@ namespace OpenSim.Region.Framework.Scenes } } + /// + /// Lets the script engines start processing scripts. + /// + public void StartScripts() + { + m_log.Info("[PRIM INVENTORY]: Starting scripts in scene"); + + IScriptModule[] engines = RequestModuleInterfaces(); + if (engines != null) + { + foreach (IScriptModule engine in engines) + { + if (engine != null) + { + engine.StartProcessing(); + } + } + } + } + public void AddUploadedInventoryItem(UUID agentID, InventoryItemBase item) { IMoneyModule money = RequestModuleInterface(); -- cgit v1.1