diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
6 files changed, 37 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 7661068..435026c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -63,6 +63,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
63 | if (group is SceneObjectGroup) | 63 | if (group is SceneObjectGroup) |
64 | { | 64 | { |
65 | ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0); | 65 | ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0); |
66 | ((SceneObjectGroup) group).ResumeScripts(); | ||
66 | } | 67 | } |
67 | } | 68 | } |
68 | } | 69 | } |
@@ -218,6 +219,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
218 | { | 219 | { |
219 | remoteClient.SendAgentAlertMessage("Script saved", false); | 220 | remoteClient.SendAgentAlertMessage("Script saved", false); |
220 | } | 221 | } |
222 | part.ParentGroup.ResumeScripts(); | ||
221 | return errors; | 223 | return errors; |
222 | } | 224 | } |
223 | 225 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a34f57e..57587be 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1131,7 +1131,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1131 | { | 1131 | { |
1132 | if (m_scripts_enabled != !ScriptEngine) | 1132 | if (m_scripts_enabled != !ScriptEngine) |
1133 | { | 1133 | { |
1134 | // Tedd! Here's the method to disable the scripting engine! | ||
1135 | if (ScriptEngine) | 1134 | if (ScriptEngine) |
1136 | { | 1135 | { |
1137 | m_log.Info("Stopping all Scripts in Scene"); | 1136 | m_log.Info("Stopping all Scripts in Scene"); |
@@ -1153,6 +1152,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1153 | if (ent is SceneObjectGroup) | 1152 | if (ent is SceneObjectGroup) |
1154 | { | 1153 | { |
1155 | ((SceneObjectGroup)ent).CreateScriptInstances(0, false, DefaultScriptEngine, 0); | 1154 | ((SceneObjectGroup)ent).CreateScriptInstances(0, false, DefaultScriptEngine, 0); |
1155 | ((SceneObjectGroup)ent).ResumeScripts(); | ||
1156 | } | 1156 | } |
1157 | } | 1157 | } |
1158 | } | 1158 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 89eb54d..1421d0e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1755,6 +1755,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1755 | copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 0); | 1755 | copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 0); |
1756 | copy.HasGroupChanged = true; | 1756 | copy.HasGroupChanged = true; |
1757 | copy.ScheduleGroupForFullUpdate(); | 1757 | copy.ScheduleGroupForFullUpdate(); |
1758 | copy.ResumeScripts(); | ||
1758 | 1759 | ||
1759 | // required for physics to update it's position | 1760 | // required for physics to update it's position |
1760 | copy.AbsolutePosition = copy.AbsolutePosition; | 1761 | copy.AbsolutePosition = copy.AbsolutePosition; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 4034744..f7e46af 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -416,5 +416,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
416 | scriptModule.SetXMLState(itemID, n.OuterXml); | 416 | scriptModule.SetXMLState(itemID, n.OuterXml); |
417 | } | 417 | } |
418 | } | 418 | } |
419 | |||
420 | public void ResumeScripts() | ||
421 | { | ||
422 | foreach (SceneObjectPart part in m_parts.Values) | ||
423 | { | ||
424 | part.Inventory.ResumeScripts(); | ||
425 | } | ||
426 | } | ||
419 | } | 427 | } |
420 | } | 428 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 2e13f90..2b6be29 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -1042,5 +1042,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
1042 | 1042 | ||
1043 | return ret; | 1043 | return ret; |
1044 | } | 1044 | } |
1045 | |||
1046 | public void ResumeScripts() | ||
1047 | { | ||
1048 | IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); | ||
1049 | if (engines == null) | ||
1050 | return; | ||
1051 | |||
1052 | |||
1053 | lock (m_items) | ||
1054 | { | ||
1055 | foreach (TaskInventoryItem item in m_items.Values) | ||
1056 | { | ||
1057 | if (item.InvType == (int)InventoryType.LSL) | ||
1058 | { | ||
1059 | foreach (IScriptModule engine in engines) | ||
1060 | { | ||
1061 | if (engine != null) | ||
1062 | engine.ResumeScript(item.ItemID); | ||
1063 | } | ||
1064 | } | ||
1065 | } | ||
1066 | } | ||
1067 | } | ||
1045 | } | 1068 | } |
1046 | } \ No newline at end of file | 1069 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index cf0f345..b6677f0 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs | |||
@@ -182,6 +182,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
182 | foreach (SceneObjectGroup sceneObject in sceneObjects) | 182 | foreach (SceneObjectGroup sceneObject in sceneObjects) |
183 | { | 183 | { |
184 | sceneObject.CreateScriptInstances(0, true, scene.DefaultScriptEngine, 0); | 184 | sceneObject.CreateScriptInstances(0, true, scene.DefaultScriptEngine, 0); |
185 | sceneObject.ResumeScripts(); | ||
185 | } | 186 | } |
186 | } | 187 | } |
187 | 188 | ||