diff options
author | Justin Clark-Casey (justincc) | 2011-08-30 23:32:30 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-30 23:32:30 +0100 |
commit | ddc733cd3d940a4357eb0d235562050eb6f206bf (patch) | |
tree | f77e542f00edcdbb0f645665a869765a10532f1c /OpenSim/Region/CoreModules | |
parent | also get "nant clean" to remove old .mdb from .exe and .dll (diff) | |
download | opensim-SC_OLD-ddc733cd3d940a4357eb0d235562050eb6f206bf.zip opensim-SC_OLD-ddc733cd3d940a4357eb0d235562050eb6f206bf.tar.gz opensim-SC_OLD-ddc733cd3d940a4357eb0d235562050eb6f206bf.tar.bz2 opensim-SC_OLD-ddc733cd3d940a4357eb0d235562050eb6f206bf.tar.xz |
refactor: move SP.SaveChangedAttachments() fully into AttachmentsModule
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index f6aea89..201ce7f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -133,6 +133,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | } | 135 | } |
136 | |||
137 | public void SaveChangedAttachments(IScenePresence sp) | ||
138 | { | ||
139 | // Need to copy this list because DetachToInventoryPrep mods it | ||
140 | List<SceneObjectGroup> attachments = new List<SceneObjectGroup>(sp.Attachments.ToArray()); | ||
141 | |||
142 | foreach (SceneObjectGroup grp in attachments) | ||
143 | { | ||
144 | if (grp.HasGroupChanged) // Resizer scripts? | ||
145 | { | ||
146 | grp.IsAttachment = false; | ||
147 | grp.AbsolutePosition = grp.RootPart.AttachedPos; | ||
148 | // grp.DetachToInventoryPrep(); | ||
149 | UpdateKnownItem(sp.ControllingClient, grp, grp.GetFromItemID(), grp.OwnerID); | ||
150 | grp.IsAttachment = true; | ||
151 | } | ||
152 | } | ||
153 | } | ||
136 | 154 | ||
137 | /// <summary> | 155 | /// <summary> |
138 | /// Called by client | 156 | /// Called by client |