From ff098ae110bb3175fe6a7bf37a03e3f22eb829e3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 13 Sep 2010 20:44:32 +0100 Subject: minor: Clean up log messages generated when an item is attached --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 177cf1e..51a0f2a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3727,8 +3727,8 @@ namespace OpenSim.Region.Framework.Scenes return; UUID itemID = m_appearance.GetAttachedItem(p); - UUID assetID = m_appearance.GetAttachedAsset(p); + //UUID assetID = m_appearance.GetAttachedAsset(p); // For some reason assetIDs are being written as Zero's in the DB -- need to track tat down // But they're not used anyway, the item is being looked up for now, so let's proceed. //if (UUID.Zero == assetID) @@ -3739,17 +3739,11 @@ namespace OpenSim.Region.Framework.Scenes try { - // Rez from inventory - UUID asset - = m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p); - - m_log.InfoFormat( - "[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {2} ({3})", - p, itemID, assetID, asset); + m_scene.AttachmentsModule.RezSingleAttachmentFromInventory(ControllingClient, itemID, (uint)p); } catch (Exception e) { - m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString()); + m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}{1}", e.Message, e.StackTrace); } } } -- cgit v1.1 From cd153a20b7e50edfa6a8c0098a456876b3088adf Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 13 Sep 2010 21:05:03 +0100 Subject: Remove IAttachmentsModule.SetAttachmentInventoryStatus() from public interface No core module is calling and it makes more sense to call methods such as AttachObject() which attach both to the avatar and update inventory appropriately --- OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index 1140b9b..24e481b 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs @@ -109,17 +109,6 @@ namespace OpenSim.Region.Framework.Interfaces /// /// void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient); - - /// - /// Update the user inventory to the attachment of an item - /// - /// - /// - /// - /// - /// - UUID SetAttachmentInventoryStatus( - SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt); /// /// Update the user inventory to show a detach. -- cgit v1.1 From 7ae926618612a76bf143b1cbcd6e420828becb5a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 13 Sep 2010 21:20:31 +0100 Subject: Remove SceneGraph.DetachObject() which was accidentally left around after being migrated to AttachmentsModule --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 5ac8ff5..85ff32e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -522,16 +522,6 @@ namespace OpenSim.Region.Framework.Scenes m_parentScene.AttachmentsModule.DetachSingleAttachmentToGround(group.UUID, remoteClient); } - protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient) - { - SceneObjectGroup group = GetGroupByPrim(objectLocalID); - if (group != null) - { - //group.DetachToGround(); - m_parentScene.AttachmentsModule.ShowDetachInUserInventory(group.GetFromItemID(), remoteClient); - } - } - protected internal void HandleUndo(IClientAPI remoteClient, UUID primId) { if (primId != UUID.Zero) -- cgit v1.1 From dd803b4f0c50c4ac1eda5ae7622dc91b2a63db3f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 13 Sep 2010 21:53:25 +0100 Subject: minor: Add comments which explain what's going on wrt avatar movements at various points in the main scene loop and associated methods --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++++ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 ++ 2 files changed, 6 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6d2ae5a..ef97dfc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1319,6 +1319,7 @@ namespace OpenSim.Region.Framework.Scenes if (m_frame % m_update_presences == 0) m_sceneGraph.UpdatePresences(); + // Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client) if (m_frame % m_update_coarse_locations == 0) { List coarseLocations; @@ -1336,9 +1337,12 @@ namespace OpenSim.Region.Framework.Scenes m_sceneGraph.UpdatePreparePhysics(); physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2); + // Apply any pending avatar force input to the avatar's velocity if (m_frame % m_update_entitymovement == 0) m_sceneGraph.UpdateScenePresenceMovement(); + // Perform the main physics update. This will do the actual work of moving objects and avatars according to their + // velocity int tmpPhysicsMS = Util.EnvironmentTickCount(); if (m_frame % m_update_physics == 0) { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 51a0f2a..a77f38c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1522,6 +1522,8 @@ namespace OpenSim.Region.Framework.Scenes } } + // If the agent update does move the avatar, then calculate the force ready for the velocity update, + // which occurs later in the main scene loop if (update_movementflag || (update_rotation && DCFlagKeyPressed)) { // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); -- cgit v1.1 From 36f81c66e51e84d8ce7bd40860ed78e9c2a108c2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 14 Sep 2010 00:05:38 +0100 Subject: Comment out SOG storing debug log message This can get very spammy with regularly changing objects. Please uncomment if required. --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 2c1f207..dc6509d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1430,9 +1430,9 @@ namespace OpenSim.Region.Framework.Scenes // don't backup while it's selected or you're asking for changes mid stream. if (isTimeToPersist() || forcedBackup) { - m_log.DebugFormat( - "[SCENE]: Storing {0}, {1} in {2}", - Name, UUID, m_scene.RegionInfo.RegionName); +// m_log.DebugFormat( +// "[SCENE]: Storing {0}, {1} in {2}", +// Name, UUID, m_scene.RegionInfo.RegionName); SceneObjectGroup backup_group = Copy(false); backup_group.RootPart.Velocity = RootPart.Velocity; -- cgit v1.1