diff options
author | Melanie Thielker | 2008-08-19 18:34:46 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-19 18:34:46 +0000 |
commit | 41440e184b1c12f1b83d894b2cd5b7b801b4ca38 (patch) | |
tree | 1d3298ae47cc11f0167257a7aab7a45212b7a497 /OpenSim/Region/Environment | |
parent | Moves one file to it's proper location (diff) | |
download | opensim-SC_OLD-41440e184b1c12f1b83d894b2cd5b7b801b4ca38.zip opensim-SC_OLD-41440e184b1c12f1b83d894b2cd5b7b801b4ca38.tar.gz opensim-SC_OLD-41440e184b1c12f1b83d894b2cd5b7b801b4ca38.tar.bz2 opensim-SC_OLD-41440e184b1c12f1b83d894b2cd5b7b801b4ca38.tar.xz |
Attachment persistence (Mantis #1711)
Change user server to handle attachment assets record properly. Ensure
that attachments are not re-rezzed on region crossing. Persistence
will NOT WORK with earliser UGAI!!
Change region server to match.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 706fd61..4bc5d34 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -2880,24 +2880,33 @@ namespace OpenSim.Region.Environment.Scenes | |||
2880 | if (attachpoint == 0) | 2880 | if (attachpoint == 0) |
2881 | return; | 2881 | return; |
2882 | 2882 | ||
2883 | LLUUID asset = m_appearance.GetAttachedAsset(attachpoint); | ||
2884 | if (asset == LLUUID.Zero) // We have just logged in | ||
2885 | { | ||
2886 | m_log.InfoFormat("[ATTACHMENT] Rez attachment {0}", | ||
2887 | itemID.ToString()); | ||
2888 | |||
2889 | // Rez from inventory | ||
2890 | m_scene.RezSingleAttachment(ControllingClient, itemID, | ||
2891 | (uint)attachpoint, 0, 0); | ||
2892 | return; | ||
2893 | } | ||
2894 | |||
2883 | SceneObjectPart att = m_scene.GetSceneObjectPart(m_appearance.GetAttachedAsset(attachpoint)); | 2895 | SceneObjectPart att = m_scene.GetSceneObjectPart(m_appearance.GetAttachedAsset(attachpoint)); |
2884 | 2896 | ||
2885 | 2897 | ||
2886 | // If this is null, then we have just rezzed in. Non null means | 2898 | // If this is null, then the asset has not yet appeared in world |
2887 | // we're crossing | 2899 | // so we revisit this when it does |
2888 | // | 2900 | // |
2889 | if (att != null) | 2901 | if (att != null) |
2890 | { | 2902 | { |
2891 | System.Console.WriteLine("Attach from world {0}", itemID.ToString()); | 2903 | m_log.InfoFormat("[ATTACHEMENT] Attach from world {0}", |
2904 | itemID.ToString()); | ||
2905 | |||
2892 | // Attach from world | 2906 | // Attach from world |
2893 | if (att.ParentGroup != null) | 2907 | if (att.ParentGroup != null) |
2894 | m_scene.RezSingleAttachment(att.ParentGroup, ControllingClient, itemID, (uint)attachpoint, 0, 0); | 2908 | m_scene.RezSingleAttachment(att.ParentGroup, |
2895 | } | 2909 | ControllingClient, itemID, (uint)attachpoint, 0, 0); |
2896 | else | ||
2897 | { | ||
2898 | System.Console.WriteLine("Rez attachment {0}", itemID.ToString()); | ||
2899 | // Rez from inventory | ||
2900 | m_scene.RezSingleAttachment(ControllingClient, itemID, (uint)attachpoint, 0, 0); | ||
2901 | } | 2910 | } |
2902 | } | 2911 | } |
2903 | } | 2912 | } |