diff options
author | Melanie | 2010-11-16 20:44:39 +0100 |
---|---|---|
committer | Melanie | 2010-11-16 20:44:39 +0100 |
commit | 4f15b8d4e6be1e1fe88ad32aa43595861d1005ad (patch) | |
tree | 5c6dd29543347ea43c2a46658a451b355fdbf528 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Can't detach an object from within the script thread because it will throw. (diff) | |
download | opensim-SC_OLD-4f15b8d4e6be1e1fe88ad32aa43595861d1005ad.zip opensim-SC_OLD-4f15b8d4e6be1e1fe88ad32aa43595861d1005ad.tar.gz opensim-SC_OLD-4f15b8d4e6be1e1fe88ad32aa43595861d1005ad.tar.bz2 opensim-SC_OLD-4f15b8d4e6be1e1fe88ad32aa43595861d1005ad.tar.xz |
Change the way attachments are persisted. Editing a worn attachment will now
save properly, as will the results of a resizer script working. Attachment
positions are no longer saved on each move, but instead are saved once on
logout. Attachment script states are saved as part of the attachment now
when detaching.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cc9c445..dfaf06d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -4340,6 +4340,24 @@ if (m_animator.m_jumping) force.Z = m_animator.m_jumpVelocity; // add for ju | |||
4340 | return(new Vector3(x,y,z)); | 4340 | return(new Vector3(x,y,z)); |
4341 | } | 4341 | } |
4342 | 4342 | ||
4343 | public void SaveChangedAttachments() | ||
4344 | { | ||
4345 | // Need to copy this list because DetachToInventoryPrep mods it | ||
4346 | List<SceneObjectGroup> attachments = new List<SceneObjectGroup>(Attachments.ToArray()); | ||
4343 | 4347 | ||
4348 | IAttachmentsModule attachmentsModule = m_scene.AttachmentsModule; | ||
4349 | if (attachmentsModule != null) | ||
4350 | { | ||
4351 | foreach (SceneObjectGroup grp in attachments) | ||
4352 | { | ||
4353 | if (grp.HasGroupChanged) // Resizer scripts? | ||
4354 | { | ||
4355 | grp.DetachToInventoryPrep(); | ||
4356 | attachmentsModule.UpdateKnownItem(ControllingClient, | ||
4357 | grp, grp.GetFromItemID(), grp.OwnerID); | ||
4358 | } | ||
4359 | } | ||
4360 | } | ||
4361 | } | ||
4344 | } | 4362 | } |
4345 | } | 4363 | } |