diff options
All scripts are now created suspended and are only unsuspended when the object
is fully rezzed and all scripts in it are instantiated. This ensures that link
messages will not be lost on rez/region crossing and makes heavily scripted
objects reliable.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 25 |
1 files changed, 24 insertions, 1 deletions
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 | } |