diff options
author | Melanie | 2010-04-19 07:00:40 +0100 |
---|---|---|
committer | Melanie | 2010-04-19 07:00:40 +0100 |
commit | 98cb4f74b265dfb8ca3eb8c8d3ad604249398df1 (patch) | |
tree | 1339d3707430a20662bdcd3eb4e9ef86abc6a4fd /OpenSim/Region/Framework/Scenes | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
parent | All scripts are now created suspended and are only unsuspended when the object (diff) | |
download | opensim-SC-98cb4f74b265dfb8ca3eb8c8d3ad604249398df1.zip opensim-SC-98cb4f74b265dfb8ca3eb8c8d3ad604249398df1.tar.gz opensim-SC-98cb4f74b265dfb8ca3eb8c8d3ad604249398df1.tar.bz2 opensim-SC-98cb4f74b265dfb8ca3eb8c8d3ad604249398df1.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
8 files changed, 98 insertions, 67 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index fd7d44f..31ca2ab 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -420,11 +420,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
420 | if (m_scenePresence.IsChildAgent) | 420 | if (m_scenePresence.IsChildAgent) |
421 | return; | 421 | return; |
422 | 422 | ||
423 | m_scenePresence.Scene.ForEachScenePresence( | 423 | UUID[] animIDs; |
424 | delegate(ScenePresence SP) | 424 | int[] sequenceNums; |
425 | { | 425 | UUID[] objectIDs; |
426 | SP.Animator.SendAnimPack(); | 426 | |
427 | }); | 427 | m_animations.GetArrays(out animIDs, out sequenceNums, out objectIDs); |
428 | client.SendAnimations(animIDs, sequenceNums, m_scenePresence.ControllingClient.AgentId, objectIDs); | ||
428 | } | 429 | } |
429 | 430 | ||
430 | /// <summary> | 431 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 357cdc4..bf4c91f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -35,7 +35,6 @@ using OpenMetaverse; | |||
35 | using OpenMetaverse.Packets; | 35 | using OpenMetaverse.Packets; |
36 | using log4net; | 36 | using log4net; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | |||
39 | using OpenSim.Region.Framework; | 38 | using OpenSim.Region.Framework; |
40 | using OpenSim.Region.Framework.Interfaces; | 39 | using OpenSim.Region.Framework.Interfaces; |
41 | using OpenSim.Region.Framework.Scenes.Serialization; | 40 | using OpenSim.Region.Framework.Scenes.Serialization; |
@@ -64,6 +63,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
64 | if (group is SceneObjectGroup) | 63 | if (group is SceneObjectGroup) |
65 | { | 64 | { |
66 | ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0); | 65 | ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0); |
66 | ((SceneObjectGroup) group).ResumeScripts(); | ||
67 | } | 67 | } |
68 | } | 68 | } |
69 | } | 69 | } |
@@ -218,6 +218,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
218 | { | 218 | { |
219 | remoteClient.SendAgentAlertMessage("Script saved", false); | 219 | remoteClient.SendAgentAlertMessage("Script saved", false); |
220 | } | 220 | } |
221 | part.ParentGroup.ResumeScripts(); | ||
221 | return errors; | 222 | return errors; |
222 | } | 223 | } |
223 | 224 | ||
@@ -471,7 +472,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
471 | return null; | 472 | return null; |
472 | } | 473 | } |
473 | 474 | ||
474 | |||
475 | if (recipientParentFolderId == UUID.Zero) | 475 | if (recipientParentFolderId == UUID.Zero) |
476 | { | 476 | { |
477 | InventoryFolderBase recipientRootFolder = InventoryService.GetRootFolder(recipientId); | 477 | InventoryFolderBase recipientRootFolder = InventoryService.GetRootFolder(recipientId); |
@@ -721,6 +721,37 @@ namespace OpenSim.Region.Framework.Scenes | |||
721 | } | 721 | } |
722 | } | 722 | } |
723 | 723 | ||
724 | private void HandleLinkInventoryItem(IClientAPI remoteClient, UUID transActionID, UUID folderID, | ||
725 | uint callbackID, string description, string name, | ||
726 | sbyte invType, sbyte type, UUID olditemID) | ||
727 | { | ||
728 | m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item link {0} in folder {1} pointing to {2}", name, folderID, olditemID); | ||
729 | |||
730 | if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) | ||
731 | return; | ||
732 | |||
733 | ScenePresence presence; | ||
734 | if (TryGetScenePresence(remoteClient.AgentId, out presence)) | ||
735 | { | ||
736 | byte[] data = null; | ||
737 | |||
738 | AssetBase asset = new AssetBase(); | ||
739 | asset.FullID = olditemID; | ||
740 | asset.Type = type; | ||
741 | asset.Name = name; | ||
742 | asset.Description = description; | ||
743 | |||
744 | CreateNewInventoryItem(remoteClient, remoteClient.AgentId.ToString(), folderID, name, 0, callbackID, asset, invType, (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); | ||
745 | |||
746 | } | ||
747 | else | ||
748 | { | ||
749 | m_log.ErrorFormat( | ||
750 | "ScenePresence for agent uuid {0} unexpectedly not found in HandleLinkInventoryItem", | ||
751 | remoteClient.AgentId); | ||
752 | } | ||
753 | } | ||
754 | |||
724 | /// <summary> | 755 | /// <summary> |
725 | /// Remove an inventory item for the client's inventory | 756 | /// Remove an inventory item for the client's inventory |
726 | /// </summary> | 757 | /// </summary> |
@@ -1163,6 +1194,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1163 | item = LibraryService.LibraryRootFolder.FindItem(itemID); | 1194 | item = LibraryService.LibraryRootFolder.FindItem(itemID); |
1164 | } | 1195 | } |
1165 | 1196 | ||
1197 | // If we've found the item in the user's inventory or in the library | ||
1166 | if (item != null) | 1198 | if (item != null) |
1167 | { | 1199 | { |
1168 | part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); | 1200 | part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); |
@@ -1841,50 +1873,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1841 | EventManager.TriggerStopScript(part.LocalId, itemID); | 1873 | EventManager.TriggerStopScript(part.LocalId, itemID); |
1842 | } | 1874 | } |
1843 | 1875 | ||
1844 | internal void SendAttachEvent(uint localID, UUID itemID, UUID avatarID) | ||
1845 | { | ||
1846 | EventManager.TriggerOnAttach(localID, itemID, avatarID); | ||
1847 | } | ||
1848 | |||
1849 | public void RezMultipleAttachments(IClientAPI remoteClient, RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, | ||
1850 | RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects) | ||
1851 | { | ||
1852 | foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in objects) | ||
1853 | { | ||
1854 | AttachmentsModule.RezSingleAttachmentFromInventory(remoteClient, obj.ItemID, obj.AttachmentPt); | ||
1855 | } | ||
1856 | } | ||
1857 | |||
1858 | public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient) | ||
1859 | { | ||
1860 | SceneObjectPart part = GetSceneObjectPart(itemID); | ||
1861 | if (part == null || part.ParentGroup == null) | ||
1862 | return; | ||
1863 | |||
1864 | UUID inventoryID = part.ParentGroup.GetFromItemID(); | ||
1865 | |||
1866 | ScenePresence presence; | ||
1867 | if (TryGetScenePresence(remoteClient.AgentId, out presence)) | ||
1868 | { | ||
1869 | if (!Permissions.CanRezObject(part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition)) | ||
1870 | return; | ||
1871 | |||
1872 | presence.Appearance.DetachAttachment(itemID); | ||
1873 | IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>(); | ||
1874 | if (ava != null) | ||
1875 | { | ||
1876 | ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | ||
1877 | } | ||
1878 | part.ParentGroup.DetachToGround(); | ||
1879 | |||
1880 | List<UUID> uuids = new List<UUID>(); | ||
1881 | uuids.Add(inventoryID); | ||
1882 | InventoryService.DeleteItems(remoteClient.AgentId, uuids); | ||
1883 | remoteClient.SendRemoveInventoryItem(inventoryID); | ||
1884 | } | ||
1885 | SendAttachEvent(part.ParentGroup.LocalId, itemID, UUID.Zero); | ||
1886 | } | ||
1887 | |||
1888 | public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) | 1876 | public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) |
1889 | { | 1877 | { |
1890 | EventManager.TriggerGetScriptRunning(controllingClient, objectID, itemID); | 1878 | EventManager.TriggerGetScriptRunning(controllingClient, objectID, itemID); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 671f8fc..58f890f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1159,7 +1159,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1159 | { | 1159 | { |
1160 | if (m_scripts_enabled != !ScriptEngine) | 1160 | if (m_scripts_enabled != !ScriptEngine) |
1161 | { | 1161 | { |
1162 | // Tedd! Here's the method to disable the scripting engine! | ||
1163 | if (ScriptEngine) | 1162 | if (ScriptEngine) |
1164 | { | 1163 | { |
1165 | m_log.Info("Stopping all Scripts in Scene"); | 1164 | m_log.Info("Stopping all Scripts in Scene"); |
@@ -1181,6 +1180,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1181 | if (ent is SceneObjectGroup) | 1180 | if (ent is SceneObjectGroup) |
1182 | { | 1181 | { |
1183 | ((SceneObjectGroup)ent).CreateScriptInstances(0, false, DefaultScriptEngine, 0); | 1182 | ((SceneObjectGroup)ent).CreateScriptInstances(0, false, DefaultScriptEngine, 0); |
1183 | ((SceneObjectGroup)ent).ResumeScripts(); | ||
1184 | } | 1184 | } |
1185 | } | 1185 | } |
1186 | } | 1186 | } |
@@ -2777,6 +2777,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2777 | public virtual void SubscribeToClientInventoryEvents(IClientAPI client) | 2777 | public virtual void SubscribeToClientInventoryEvents(IClientAPI client) |
2778 | { | 2778 | { |
2779 | client.OnCreateNewInventoryItem += CreateNewInventoryItem; | 2779 | client.OnCreateNewInventoryItem += CreateNewInventoryItem; |
2780 | client.OnLinkInventoryItem += HandleLinkInventoryItem; | ||
2780 | client.OnCreateNewInventoryFolder += HandleCreateInventoryFolder; | 2781 | client.OnCreateNewInventoryFolder += HandleCreateInventoryFolder; |
2781 | client.OnUpdateInventoryFolder += HandleUpdateInventoryFolder; | 2782 | client.OnUpdateInventoryFolder += HandleUpdateInventoryFolder; |
2782 | client.OnMoveInventoryFolder += HandleMoveInventoryFolder; // 2; //!! | 2783 | client.OnMoveInventoryFolder += HandleMoveInventoryFolder; // 2; //!! |
@@ -2796,14 +2797,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2796 | } | 2797 | } |
2797 | 2798 | ||
2798 | public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) | 2799 | public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) |
2799 | { | 2800 | { |
2800 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; | ||
2801 | client.OnObjectDetach += m_sceneGraph.DetachObject; | ||
2802 | |||
2803 | if (AttachmentsModule != null) | 2801 | if (AttachmentsModule != null) |
2804 | { | 2802 | { |
2805 | client.OnRezSingleAttachmentFromInv += AttachmentsModule.RezSingleAttachmentFromInventory; | 2803 | client.OnRezSingleAttachmentFromInv += AttachmentsModule.RezSingleAttachmentFromInventory; |
2804 | client.OnRezMultipleAttachmentsFromInv += AttachmentsModule.RezMultipleAttachmentsFromInventory; | ||
2806 | client.OnObjectAttach += AttachmentsModule.AttachObject; | 2805 | client.OnObjectAttach += AttachmentsModule.AttachObject; |
2806 | client.OnObjectDetach += AttachmentsModule.DetachObject; | ||
2807 | client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; | 2807 | client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; |
2808 | } | 2808 | } |
2809 | } | 2809 | } |
@@ -2952,14 +2952,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2952 | } | 2952 | } |
2953 | 2953 | ||
2954 | public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) | 2954 | public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) |
2955 | { | 2955 | { |
2956 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; | ||
2957 | client.OnObjectDetach -= m_sceneGraph.DetachObject; | ||
2958 | |||
2959 | if (AttachmentsModule != null) | 2956 | if (AttachmentsModule != null) |
2960 | { | 2957 | { |
2961 | client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; | 2958 | client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; |
2959 | client.OnRezMultipleAttachmentsFromInv -= AttachmentsModule.RezMultipleAttachmentsFromInventory; | ||
2962 | client.OnObjectAttach -= AttachmentsModule.AttachObject; | 2960 | client.OnObjectAttach -= AttachmentsModule.AttachObject; |
2961 | client.OnObjectDetach -= AttachmentsModule.DetachObject; | ||
2963 | client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; | 2962 | client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; |
2964 | } | 2963 | } |
2965 | } | 2964 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 3a1962c..3ac34d3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -467,9 +467,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
467 | { | 467 | { |
468 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); | 468 | SceneObjectGroup group = GetGroupByPrim(objectLocalID); |
469 | if (group != null) | 469 | if (group != null) |
470 | { | 470 | m_parentScene.AttachmentsModule.DetachSingleAttachmentToGround(group.UUID, remoteClient); |
471 | m_parentScene.DetachSingleAttachmentToGround(group.UUID, remoteClient); | ||
472 | } | ||
473 | } | 471 | } |
474 | 472 | ||
475 | protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient) | 473 | protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient) |
@@ -1781,6 +1779,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1781 | copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 0); | 1779 | copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 0); |
1782 | copy.HasGroupChanged = true; | 1780 | copy.HasGroupChanged = true; |
1783 | copy.ScheduleGroupForFullUpdate(); | 1781 | copy.ScheduleGroupForFullUpdate(); |
1782 | copy.ResumeScripts(); | ||
1784 | 1783 | ||
1785 | // required for physics to update it's position | 1784 | // required for physics to update it's position |
1786 | copy.AbsolutePosition = copy.AbsolutePosition; | 1785 | copy.AbsolutePosition = copy.AbsolutePosition; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 8b58b3e..1149a20 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -171,7 +171,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
171 | item.NextPermissions; | 171 | item.NextPermissions; |
172 | taskItem.NextPermissions = item.NextPermissions; | 172 | taskItem.NextPermissions = item.NextPermissions; |
173 | taskItem.CurrentPermissions |= 8; | 173 | taskItem.CurrentPermissions |= 8; |
174 | } else { | 174 | } |
175 | else | ||
176 | { | ||
175 | taskItem.BasePermissions = item.BasePermissions; | 177 | taskItem.BasePermissions = item.BasePermissions; |
176 | taskItem.CurrentPermissions = item.CurrentPermissions; | 178 | taskItem.CurrentPermissions = item.CurrentPermissions; |
177 | taskItem.CurrentPermissions |= 8; | 179 | taskItem.CurrentPermissions |= 8; |
@@ -412,5 +414,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
412 | scriptModule.SetXMLState(itemID, n.OuterXml); | 414 | scriptModule.SetXMLState(itemID, n.OuterXml); |
413 | } | 415 | } |
414 | } | 416 | } |
417 | |||
418 | public void ResumeScripts() | ||
419 | { | ||
420 | foreach (SceneObjectPart part in m_parts.Values) | ||
421 | { | ||
422 | part.Inventory.ResumeScripts(); | ||
423 | } | ||
424 | } | ||
415 | } | 425 | } |
416 | } | 426 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index a1991c5..0404422 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | private ArrayList GetScriptErrors(UUID itemID) | 215 | public ArrayList GetScriptErrors(UUID itemID) |
216 | { | 216 | { |
217 | ArrayList ret = new ArrayList(); | 217 | ArrayList ret = new ArrayList(); |
218 | 218 | ||
@@ -653,6 +653,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
653 | item.ParentID = m_part.UUID; | 653 | item.ParentID = m_part.UUID; |
654 | item.ParentPartID = m_part.UUID; | 654 | item.ParentPartID = m_part.UUID; |
655 | item.Name = name; | 655 | item.Name = name; |
656 | item.GroupID = m_part.GroupID; | ||
656 | 657 | ||
657 | m_items.LockItemsForWrite(true); | 658 | m_items.LockItemsForWrite(true); |
658 | m_items.Add(item.ItemID, item); | 659 | m_items.Add(item.ItemID, item); |
@@ -742,6 +743,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
742 | item.ParentID = m_part.UUID; | 743 | item.ParentID = m_part.UUID; |
743 | item.ParentPartID = m_part.UUID; | 744 | item.ParentPartID = m_part.UUID; |
744 | item.Flags = m_items[item.ItemID].Flags; | 745 | item.Flags = m_items[item.ItemID].Flags; |
746 | |||
747 | // If group permissions have been set on, check that the groupID is up to date in case it has | ||
748 | // changed since permissions were last set. | ||
749 | if (item.GroupPermissions != (uint)PermissionMask.None) | ||
750 | item.GroupID = m_part.GroupID; | ||
751 | |||
745 | if (item.AssetID == UUID.Zero) | 752 | if (item.AssetID == UUID.Zero) |
746 | { | 753 | { |
747 | item.AssetID = m_items[item.ItemID].AssetID; | 754 | item.AssetID = m_items[item.ItemID].AssetID; |
@@ -894,6 +901,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
894 | uint everyoneMask = 0; | 901 | uint everyoneMask = 0; |
895 | uint baseMask = item.BasePermissions; | 902 | uint baseMask = item.BasePermissions; |
896 | uint ownerMask = item.CurrentPermissions; | 903 | uint ownerMask = item.CurrentPermissions; |
904 | uint groupMask = item.GroupPermissions; | ||
897 | 905 | ||
898 | invString.AddItemStart(); | 906 | invString.AddItemStart(); |
899 | invString.AddNameValueLine("item_id", item.ItemID.ToString()); | 907 | invString.AddNameValueLine("item_id", item.ItemID.ToString()); |
@@ -903,7 +911,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
903 | 911 | ||
904 | invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); | 912 | invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); |
905 | invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); | 913 | invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); |
906 | invString.AddNameValueLine("group_mask", Utils.UIntToHexString(0)); | 914 | invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask)); |
907 | invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); | 915 | invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); |
908 | invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); | 916 | invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); |
909 | 917 | ||
@@ -1137,5 +1145,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
1137 | } | 1145 | } |
1138 | return ret; | 1146 | return ret; |
1139 | } | 1147 | } |
1148 | |||
1149 | public void ResumeScripts() | ||
1150 | { | ||
1151 | IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>(); | ||
1152 | if (engines == null) | ||
1153 | return; | ||
1154 | |||
1155 | |||
1156 | Items.LockItemsForRead(true); | ||
1157 | |||
1158 | foreach (TaskInventoryItem item in m_items.Values) | ||
1159 | { | ||
1160 | if (item.InvType == (int)InventoryType.LSL) | ||
1161 | { | ||
1162 | foreach (IScriptModule engine in engines) | ||
1163 | { | ||
1164 | if (engine != null) | ||
1165 | engine.ResumeScript(item.ItemID); | ||
1166 | } | ||
1167 | } | ||
1168 | } | ||
1169 | |||
1170 | Items.LockItemsForRead(false); | ||
1171 | } | ||
1140 | } | 1172 | } |
1141 | } | 1173 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5c54616..c220bf0 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -959,6 +959,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
959 | 959 | ||
960 | m_isChildAgent = false; | 960 | m_isChildAgent = false; |
961 | 961 | ||
962 | // send the animations of the other presences to me | ||
962 | m_scene.ForEachScenePresence(delegate(ScenePresence presence) | 963 | m_scene.ForEachScenePresence(delegate(ScenePresence presence) |
963 | { | 964 | { |
964 | if (presence != this) | 965 | if (presence != this) |
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 | ||