diff options
author | Justin Clark-Casey (justincc) | 2011-09-13 22:13:58 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-13 22:13:58 +0100 |
commit | 8880aea728af2ccb95ea2400c7d180aa4dc98112 (patch) | |
tree | 76c22d083c04041b05e1dcf57be40970b8969793 /OpenSim/Region/Framework | |
parent | Comment out attachments code in Scene.IncomingCreateObject(UUID userID, UUID ... (diff) | |
download | opensim-SC_OLD-8880aea728af2ccb95ea2400c7d180aa4dc98112.zip opensim-SC_OLD-8880aea728af2ccb95ea2400c7d180aa4dc98112.tar.gz opensim-SC_OLD-8880aea728af2ccb95ea2400c7d180aa4dc98112.tar.bz2 opensim-SC_OLD-8880aea728af2ccb95ea2400c7d180aa4dc98112.tar.xz |
Stop attempts to rewear already worn items from removing and reattaching.
Viewer 2/3 will sometimes attempt to rewear attachments, even though they have already been attached during the main login process.
This change ignores those attempts.
This stops script failures during login, as the rewearing was racing with the script startup code.
It might also help with attachments being abnormally put into deleted state.
Hopefully resolves some more of http://opensimulator.org/mantis/view.php?id=5644
Diffstat (limited to 'OpenSim/Region/Framework')
3 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f03cf7b..36c5c52 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -652,7 +652,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
652 | if (!Entities.Remove(agentID)) | 652 | if (!Entities.Remove(agentID)) |
653 | { | 653 | { |
654 | m_log.WarnFormat( | 654 | m_log.WarnFormat( |
655 | "[SCENEGRAPH]: Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", | 655 | "[SCENE GRAPH]: Tried to remove non-existent scene presence with agent ID {0} from scene Entities list", |
656 | agentID); | 656 | agentID); |
657 | } | 657 | } |
658 | 658 | ||
@@ -675,7 +675,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
675 | } | 675 | } |
676 | else | 676 | else |
677 | { | 677 | { |
678 | m_log.WarnFormat("[SCENEGRAPH]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); | 678 | m_log.WarnFormat("[SCENE GRAPH]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID); |
679 | } | 679 | } |
680 | } | 680 | } |
681 | } | 681 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 4bca3d0..905ecc9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -389,5 +389,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
389 | for (int i = 0; i < parts.Length; i++) | 389 | for (int i = 0; i < parts.Length; i++) |
390 | parts[i].Inventory.ResumeScripts(); | 390 | parts[i].Inventory.ResumeScripts(); |
391 | } | 391 | } |
392 | |||
393 | /// <summary> | ||
394 | /// Returns true if any part in the scene object contains scripts, false otherwise. | ||
395 | /// </summary> | ||
396 | /// <returns></returns> | ||
397 | public bool ContainsScripts() | ||
398 | { | ||
399 | foreach (SceneObjectPart part in Parts) | ||
400 | if (part.Inventory.ContainsScripts()) | ||
401 | return true; | ||
402 | |||
403 | return false; | ||
404 | } | ||
392 | } | 405 | } |
393 | } | 406 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index e40e57d..57adda7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -1035,10 +1035,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
1035 | item.BasePermissions = perms; | 1035 | item.BasePermissions = perms; |
1036 | } | 1036 | } |
1037 | } | 1037 | } |
1038 | |||
1038 | m_inventorySerial++; | 1039 | m_inventorySerial++; |
1039 | HasInventoryChanged = true; | 1040 | HasInventoryChanged = true; |
1040 | } | 1041 | } |
1041 | 1042 | ||
1043 | /// <summary> | ||
1044 | /// Returns true if this part inventory contains any scripts. False otherwise. | ||
1045 | /// </summary> | ||
1046 | /// <returns></returns> | ||
1042 | public bool ContainsScripts() | 1047 | public bool ContainsScripts() |
1043 | { | 1048 | { |
1044 | lock (m_items) | 1049 | lock (m_items) |