From 0a83fde85c8cffa1da46ef0a17390399ae74fa61 Mon Sep 17 00:00:00 2001 From: Jonathan Freedman Date: Sun, 29 Aug 2010 21:28:31 -0400 Subject: Implements parcel media setting persistence and packet / CAPS handling properly for the new media settings. Signed-off-by: Melanie --- OpenSim/Region/Framework/Interfaces/IEventQueue.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs index e093f0a..81e4952 100644 --- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs +++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs @@ -28,6 +28,7 @@ using System.Net; using OpenMetaverse; using OpenMetaverse.Packets; +using OpenMetaverse.Messages.Linden; using OpenMetaverse.StructuredData; namespace OpenSim.Region.Framework.Interfaces @@ -54,7 +55,7 @@ namespace OpenSim.Region.Framework.Interfaces uint ttl, UUID transactionID, bool fromGroup, byte[] binaryBucket); void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat, bool isModerator, bool textMute); - void ParcelProperties(ParcelPropertiesPacket parcelPropertiesPacket, UUID avatarID); + void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID); void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); } } -- cgit v1.1 From 9c1c378aa1b8c4f7738514614cdf8e8b870e7263 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 31 Aug 2010 22:16:23 +0100 Subject: Add ScenePresence.GetAttachments(uint attachmentPoint) --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fbb3177..339d0c4 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3383,6 +3383,27 @@ namespace OpenSim.Region.Framework.Scenes m_attachments.Add(gobj); } } + + /// + /// Get the scene object attached to the given point. + /// + /// + /// Returns an empty list if there were no attachments at the point. + public List GetAttachments(uint attachmentPoint) + { + List attachments = new List(); + + lock (m_attachments) + { + foreach (SceneObjectGroup so in m_attachments) + { + if (attachmentPoint == so.RootPart.AttachmentPoint) + attachments.Add(so); + } + } + + return attachments; + } public bool HasAttachments() { -- cgit v1.1 From c47de942637281714c3e85bfc8b3af4405713fd3 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 31 Aug 2010 22:24:11 +0200 Subject: Adjust the "Magic numbers" we use because we can't reference the actual script state enum to reflect recent changes. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 2ac46e2..0674e62 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1940,7 +1940,7 @@ namespace OpenSim.Region.Framework.Scenes // We can only call this after adding the scene object, since the scene object references the scene // to find out if scripts should be activated at all. - group.CreateScriptInstances(param, true, DefaultScriptEngine, 2); + group.CreateScriptInstances(param, true, DefaultScriptEngine, 3); group.ScheduleGroupForFullUpdate(); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index db081cc..56ac2c2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2376,7 +2376,7 @@ namespace OpenSim.Region.Framework.Scenes return false; } - newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 1); + newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 2); newObject.ResumeScripts(); diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 2c242c9..e7175c5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1845,7 +1845,7 @@ namespace OpenSim.Region.Framework.Scenes copy.UpdateGroupRotationR(rot); } - copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 0); + copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 1); copy.HasGroupChanged = true; copy.ScheduleGroupForFullUpdate(); copy.ResumeScripts(); -- cgit v1.1 From 6cbf66827ba3cb878ab70b75fc4e3221b71d820e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 1 Sep 2010 01:11:52 +0100 Subject: refactor: move SOG.AttachToAgent() into AttachmentsModule --- .../Region/Framework/Scenes/SceneObjectGroup.cs | 71 ---------------------- 1 file changed, 71 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 40a8f83..64a6dd5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -977,77 +977,6 @@ namespace OpenSim.Region.Framework.Scenes } } - /// - /// Attach this scene object to the given avatar. - /// - /// - /// - /// - public void AttachToAgent(UUID agentID, uint attachmentpoint, Vector3 AttachOffset, bool silent) - { - ScenePresence avatar = m_scene.GetScenePresence(agentID); - if (avatar != null) - { - // don't attach attachments to child agents - if (avatar.IsChildAgent) return; - -// m_log.DebugFormat("[SOG]: Adding attachment {0} to avatar {1}", Name, avatar.Name); - - DetachFromBackup(); - - // Remove from database and parcel prim count - m_scene.DeleteFromStorage(UUID); - m_scene.EventManager.TriggerParcelPrimCountTainted(); - - m_rootPart.AttachedAvatar = agentID; - - //Anakin Lohner bug #3839 - lock (m_parts) - { - foreach (SceneObjectPart p in m_parts.Values) - { - p.AttachedAvatar = agentID; - } - } - - if (m_rootPart.PhysActor != null) - { - m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor); - m_rootPart.PhysActor = null; - } - - AbsolutePosition = AttachOffset; - m_rootPart.AttachedPos = AttachOffset; - m_rootPart.IsAttachment = true; - - m_rootPart.SetParentLocalId(avatar.LocalId); - SetAttachmentPoint(Convert.ToByte(attachmentpoint)); - - avatar.AddAttachment(this); - - if (!silent) - { - // Killing it here will cause the client to deselect it - // It then reappears on the avatar, deselected - // through the full update below - // - if (IsSelected) - { - m_scene.SendKillObject(m_rootPart.LocalId); - } - - IsSelected = false; // fudge.... - ScheduleGroupForFullUpdate(); - } - } - else - { - m_log.WarnFormat( - "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present", - UUID, agentID, Scene.RegionInfo.RegionName); - } - } - public byte GetAttachmentPoint() { return m_rootPart.Shape.State; -- cgit v1.1 From 7720419fc7e74758125dc401eb3258ba5bd9b4f8 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 2 Sep 2010 20:08:39 +0200 Subject: Experimentally comment the sending of unbaked avatars --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 339d0c4..facbc97 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2464,7 +2464,9 @@ namespace OpenSim.Region.Framework.Scenes m_controllingClient.SendAvatarDataImmediate(this); SendInitialFullUpdateToAllClients(); - SendAppearanceToAllOtherAgents(); + // Experimentally commenting this. We don't have bakes at this time + // and 1.23 will not display an avatar without bakes. + //SendAppearanceToAllOtherAgents(); } /// -- cgit v1.1 From 1c8bc9b7b6a62b38d9378ec08853ab2237c7a53a Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 2 Sep 2010 20:51:27 +0200 Subject: Remove commented code and the comment, as the change has proven out --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 --- 1 file changed, 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index facbc97..cc9355e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2464,9 +2464,6 @@ namespace OpenSim.Region.Framework.Scenes m_controllingClient.SendAvatarDataImmediate(this); SendInitialFullUpdateToAllClients(); - // Experimentally commenting this. We don't have bakes at this time - // and 1.23 will not display an avatar without bakes. - //SendAppearanceToAllOtherAgents(); } /// -- cgit v1.1