diff options
author | Justin Clark-Casey (justincc) | 2011-08-30 23:05:43 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-30 23:06:10 +0100 |
commit | 04bafd21221a789b83b039efd1c52e141944cde0 (patch) | |
tree | 7c889db25e5c4ba059f5a03bfaacf95f95966b70 /OpenSim/Region/Framework/Scenes | |
parent | add Name property to ISceneEntity (diff) | |
download | opensim-SC_OLD-04bafd21221a789b83b039efd1c52e141944cde0.zip opensim-SC_OLD-04bafd21221a789b83b039efd1c52e141944cde0.tar.gz opensim-SC_OLD-04bafd21221a789b83b039efd1c52e141944cde0.tar.bz2 opensim-SC_OLD-04bafd21221a789b83b039efd1c52e141944cde0.tar.xz |
refactor: Move ScenePresence.RezAttachments() into AttachmentsModule
This adds an incomplete IScenePresence to match ISceneEntity
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 46 |
2 files changed, 2 insertions, 46 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e0250de..e7fe8df 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2578,7 +2578,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2578 | if (aCircuit.child == false) | 2578 | if (aCircuit.child == false) |
2579 | { | 2579 | { |
2580 | sp.IsChildAgent = false; | 2580 | sp.IsChildAgent = false; |
2581 | Util.FireAndForget(delegate(object o) { sp.RezAttachments(); }); | 2581 | Util.FireAndForget(delegate(object o) { AttachmentsModule.RezAttachments(sp); }); |
2582 | } | 2582 | } |
2583 | } | 2583 | } |
2584 | 2584 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4143d44..040e801 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
66 | 66 | ||
67 | public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs); | 67 | public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence, List<Vector3> coarseLocations, List<UUID> avatarUUIDs); |
68 | 68 | ||
69 | public class ScenePresence : EntityBase, ISceneEntity | 69 | public class ScenePresence : EntityBase, IScenePresence |
70 | { | 70 | { |
71 | // ~ScenePresence() | 71 | // ~ScenePresence() |
72 | // { | 72 | // { |
@@ -444,9 +444,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
444 | 444 | ||
445 | protected PhysicsActor m_physicsActor; | 445 | protected PhysicsActor m_physicsActor; |
446 | 446 | ||
447 | /// <value> | ||
448 | /// The client controlling this presence | ||
449 | /// </value> | ||
450 | public IClientAPI ControllingClient | 447 | public IClientAPI ControllingClient |
451 | { | 448 | { |
452 | get { return m_controllingClient; } | 449 | get { return m_controllingClient; } |
@@ -2689,9 +2686,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2689 | UUID, m_appearance.VisualParams, m_appearance.Texture.GetBytes()); | 2686 | UUID, m_appearance.VisualParams, m_appearance.Texture.GetBytes()); |
2690 | } | 2687 | } |
2691 | 2688 | ||
2692 | // Because appearance setting is in a module, we actually need | ||
2693 | // to give it access to our appearance directly, otherwise we | ||
2694 | // get a synchronization issue. | ||
2695 | public AvatarAppearance Appearance | 2689 | public AvatarAppearance Appearance |
2696 | { | 2690 | { |
2697 | get { return m_appearance; } | 2691 | get { return m_appearance; } |
@@ -3813,44 +3807,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3813 | return flags; | 3807 | return flags; |
3814 | } | 3808 | } |
3815 | 3809 | ||
3816 | /// <summary> | ||
3817 | /// RezAttachments. This should only be called upon login on the first region. | ||
3818 | /// Attachment rezzings on crossings and TPs are done in a different way. | ||
3819 | /// </summary> | ||
3820 | public void RezAttachments() | ||
3821 | { | ||
3822 | if (null == m_appearance) | ||
3823 | { | ||
3824 | m_log.WarnFormat("[ATTACHMENT]: Appearance has not been initialized for agent {0}", UUID); | ||
3825 | return; | ||
3826 | } | ||
3827 | |||
3828 | List<AvatarAttachment> attachments = m_appearance.GetAttachments(); | ||
3829 | foreach (AvatarAttachment attach in attachments) | ||
3830 | { | ||
3831 | int p = attach.AttachPoint; | ||
3832 | UUID itemID = attach.ItemID; | ||
3833 | |||
3834 | //UUID assetID = attach.AssetID; | ||
3835 | // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down | ||
3836 | // But they're not used anyway, the item is being looked up for now, so let's proceed. | ||
3837 | //if (UUID.Zero == assetID) | ||
3838 | //{ | ||
3839 | // m_log.DebugFormat("[ATTACHMENT]: Cannot rez attachment in point {0} with itemID {1}", p, itemID); | ||
3840 | // continue; | ||
3841 | //} | ||
3842 | |||
3843 | try | ||
3844 | { | ||
3845 | m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p); | ||
3846 | } | ||
3847 | catch (Exception e) | ||
3848 | { | ||
3849 | m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}{1}", e.Message, e.StackTrace); | ||
3850 | } | ||
3851 | } | ||
3852 | } | ||
3853 | |||
3854 | private void ReprioritizeUpdates() | 3810 | private void ReprioritizeUpdates() |
3855 | { | 3811 | { |
3856 | if (Scene.IsReprioritizationEnabled && Scene.UpdatePrioritizationScheme != UpdatePrioritizationSchemes.Time) | 3812 | if (Scene.IsReprioritizationEnabled && Scene.UpdatePrioritizationScheme != UpdatePrioritizationSchemes.Time) |