From 30320077a292ba98f054794f9f817628bf2be0f9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 14 Jan 2011 01:01:02 +0100 Subject: Fix slam bits being lost when editing perms in prim inventory --- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 91bb3a5..004e20c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -695,7 +695,6 @@ namespace OpenSim.Region.Framework.Scenes { item.ParentID = m_part.UUID; item.ParentPartID = m_part.UUID; - item.Flags = m_items[item.ItemID].Flags; // If group permissions have been set on, check that the groupID is up to date in case it has // changed since permissions were last set. -- cgit v1.1 From 59c2cd04ba056b85eb4873e472b95826a1cc13b5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 12:35:19 -0800 Subject: DEBUG DEBUG DEBUG --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3a40196..8e4aaf1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -839,6 +839,7 @@ namespace OpenSim.Region.Framework.Scenes m_rootRegionHandle = m_scene.RegionInfo.RegionHandle; m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); + m_log.DebugFormat("[XXX] MakeRoot 1"); // Moved this from SendInitialData to ensure that m_appearance is initialized // before the inventory is processed in MakeRootAgent. This fixes a race condition @@ -899,6 +900,7 @@ namespace OpenSim.Region.Framework.Scenes } AddToPhysicalScene(isFlying); + m_log.DebugFormat("[XXX] MakeRoot 2"); if (m_appearance != null) { @@ -941,7 +943,9 @@ namespace OpenSim.Region.Framework.Scenes presence.Animator.SendAnimPackToClient(ControllingClient); }); + m_log.DebugFormat("[XXX] MakeRoot 3"); m_scene.EventManager.TriggerOnMakeRootAgent(this); + m_log.DebugFormat("[XXX] MakeRoot 4"); } /// -- cgit v1.1 From 4bcee1dfb4337fca342fd29916d5da3b4c7db954 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 13:07:02 -0800 Subject: Revert "DEBUG DEBUG DEBUG" This reverts commit 59c2cd04ba056b85eb4873e472b95826a1cc13b5. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8e4aaf1..3a40196 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -839,7 +839,6 @@ namespace OpenSim.Region.Framework.Scenes m_rootRegionHandle = m_scene.RegionInfo.RegionHandle; m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); - m_log.DebugFormat("[XXX] MakeRoot 1"); // Moved this from SendInitialData to ensure that m_appearance is initialized // before the inventory is processed in MakeRootAgent. This fixes a race condition @@ -900,7 +899,6 @@ namespace OpenSim.Region.Framework.Scenes } AddToPhysicalScene(isFlying); - m_log.DebugFormat("[XXX] MakeRoot 2"); if (m_appearance != null) { @@ -943,9 +941,7 @@ namespace OpenSim.Region.Framework.Scenes presence.Animator.SendAnimPackToClient(ControllingClient); }); - m_log.DebugFormat("[XXX] MakeRoot 3"); m_scene.EventManager.TriggerOnMakeRootAgent(this); - m_log.DebugFormat("[XXX] MakeRoot 4"); } /// -- cgit v1.1 From c544f0d0c5fcea625107c0eff25be8aa0586564a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 18 Jan 2011 00:25:24 +0000 Subject: Prune some of the excess logging for client logins. Didn't touch the appearance related stuff. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3a40196..7b94202 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1161,9 +1161,9 @@ namespace OpenSim.Region.Framework.Scenes friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); } - m_log.DebugFormat( - "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", - client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); +// m_log.DebugFormat( +// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", +// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); } /// -- cgit v1.1 From 3083c517a01b4265434f9286aa1c95b2b513549b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 18 Jan 2011 00:29:10 +0000 Subject: minor: resolve some mono compiler warnings --- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 2 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 004e20c..cff2cf4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -849,7 +849,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void RequestInventoryFile(IClientAPI client, IXfer xferManager) { - bool changed = CreateInventoryFile(); + CreateInventoryFile(); if (m_inventorySerial == 0) // No inventory { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7b94202..03cd90f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1108,7 +1108,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void CompleteMovement(IClientAPI client) { - DateTime startTime = DateTime.Now; +// DateTime startTime = DateTime.Now; m_log.DebugFormat( "[SCENE PRESENCE]: Completing movement of {0} into region {1}", -- cgit v1.1 From c98d1cffe222085378ef8a9935f956882eae4ee9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 17 Jan 2011 17:40:48 -0800 Subject: Removed the call to sceneViewer.Reset upon MakeRoot and ChildAgentUpdate, because Reset hangs for a long time waiting for the lock. That is a problem in itself -- that long holding of the lock by some thread -- but let's just avoid it altogether. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 -------- 1 file changed, 8 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3a40196..f811f3e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -928,10 +928,6 @@ namespace OpenSim.Region.Framework.Scenes //else // m_log.ErrorFormat("[SCENE]: Could not find user info for {0} when making it a root agent", m_uuid); - // On the next prim update, all objects will be sent - // - m_sceneViewer.Reset(); - m_isChildAgent = false; // send the animations of the other presences to me @@ -2952,10 +2948,6 @@ namespace OpenSim.Region.Framework.Scenes if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) ControllingClient.SetChildAgentThrottle(cAgentData.Throttles); - // Sends out the objects in the user's draw distance if m_sendTasksToChild is true. - if (m_scene.m_seeIntoRegionFromNeighbor) - m_sceneViewer.Reset(); - //cAgentData.AVHeight; m_rootRegionHandle = cAgentData.RegionHandle; //m_velocity = cAgentData.Velocity; -- cgit v1.1 From b91c99b5968fe9fc2cd7a4b94b8b728f4db63aaa Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 24 Jan 2011 03:07:01 +0000 Subject: Fix script data not being reset as it should be --- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index cff2cf4..67e59c6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -178,6 +178,8 @@ namespace OpenSim.Region.Framework.Scenes { item.LastOwnerID = item.OwnerID; item.OwnerID = ownerId; + item.PermsMask = 0; + item.PermsGranter = UUID.Zero; } } } @@ -1012,6 +1014,8 @@ namespace OpenSim.Region.Framework.Scenes item.BasePermissions &= item.NextPermissions; item.EveryonePermissions &= item.NextPermissions; item.OwnerChanged = true; + item.PermsMask = 0; + item.PermsGranter = UUID.Zero; } } } -- cgit v1.1 From a0469daf759d09de040aa8b5287fab9a83555cc1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 26 Jan 2011 21:12:41 +0000 Subject: Implement command "land show". This shows all the parcels on the currently selected region/s This is useful for diagnostics. The command is "land show" rather than "show land" because it's implemented as a module specific subcommand. --- OpenSim/Region/Framework/Interfaces/ILandObject.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/ILandObject.cs b/OpenSim/Region/Framework/Interfaces/ILandObject.cs index 585eb00..b7487e8 100644 --- a/OpenSim/Region/Framework/Interfaces/ILandObject.cs +++ b/OpenSim/Region/Framework/Interfaces/ILandObject.cs @@ -43,7 +43,11 @@ namespace OpenSim.Region.Framework.Interfaces LandData LandData { get; set; } bool[,] LandBitmap { get; set; } UUID RegionUUID { get; } + Vector3 StartPoint { get; } + Vector3 EndPoint { get; } + bool ContainsPoint(int x, int y); + ILandObject Copy(); void SendLandUpdateToAvatarsOverMe(); -- cgit v1.1 From 8eb2789ae1d1f94ea9dfe4bf25b1c69065f0f960 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 26 Jan 2011 21:19:22 +0000 Subject: Add some comments on ILandObject.StartPoint and EndPoint --- OpenSim/Region/Framework/Interfaces/ILandObject.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/ILandObject.cs b/OpenSim/Region/Framework/Interfaces/ILandObject.cs index b7487e8..576b645 100644 --- a/OpenSim/Region/Framework/Interfaces/ILandObject.cs +++ b/OpenSim/Region/Framework/Interfaces/ILandObject.cs @@ -43,7 +43,17 @@ namespace OpenSim.Region.Framework.Interfaces LandData LandData { get; set; } bool[,] LandBitmap { get; set; } UUID RegionUUID { get; } + + /// + /// The start point for the land object. This is the western-most point as one scans land working from + /// north to south. + /// Vector3 StartPoint { get; } + + /// + /// The end point for the land object. This is the eastern-most point as one scans land working from + /// south to north. + /// Vector3 EndPoint { get; } bool ContainsPoint(int x, int y); -- cgit v1.1 From 240c0eaf1d8886378829e32a68aa9d2534f31a09 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Wed, 26 Jan 2011 13:33:34 -0800 Subject: Remove the RestorePresences functions (which don't seem to be doing anything) and clean up the code in AddNewClient (so Appearance only gets assigned once, not three times). --- OpenSim/Region/Framework/Scenes/Scene.cs | 77 ++++----------------------- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 +- 2 files changed, 12 insertions(+), 69 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 12fd813..71d0f09 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -498,12 +498,6 @@ namespace OpenSim.Region.Framework.Scenes get { return m_sceneGraph.Entities; } } - public Dictionary m_restorePresences - { - get { return m_sceneGraph.RestorePresences; } - set { m_sceneGraph.RestorePresences = value; } - } - #endregion Properties #region Constructors @@ -2483,56 +2477,24 @@ namespace OpenSim.Region.Framework.Scenes (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0; CheckHeartbeat(); - ScenePresence presence; - if (m_restorePresences.ContainsKey(client.AgentId)) + if (GetScenePresence(client.AgentId) == null) // ensure there is no SP here { - m_log.DebugFormat("[SCENE]: Restoring agent {0} {1} in {2}", client.Name, client.AgentId, RegionInfo.RegionName); + m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName); m_clientManager.Add(client); SubscribeToClientEvents(client); - presence = m_restorePresences[client.AgentId]; - m_restorePresences.Remove(client.AgentId); - - // This is one of two paths to create avatars that are - // used. This tends to get called more in standalone - // than grid, not really sure why, but as such needs - // an explicity appearance lookup here. - AvatarAppearance appearance = null; - GetAvatarAppearance(client, out appearance); - presence.Appearance = appearance; + ScenePresence sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance); + m_eventManager.TriggerOnNewPresence(sp); - presence.initializeScenePresence(client, RegionInfo, this); - - m_sceneGraph.AddScenePresence(presence); - - lock (m_restorePresences) + // HERE!!! Do the initial attachments right here + // first agent upon login is a root agent by design. + // All other AddNewClient calls find aCircuit.child to be true + if (aCircuit.child == false) { - Monitor.PulseAll(m_restorePresences); - } - } - else - { - if (GetScenePresence(client.AgentId) == null) // ensure there is no SP here - { - m_log.Debug("[SCENE]: Adding new agent " + client.Name + " to scene " + RegionInfo.RegionName); - - m_clientManager.Add(client); - SubscribeToClientEvents(client); - - ScenePresence sp = CreateAndAddScenePresence(client); - if (aCircuit != null) - sp.Appearance = aCircuit.Appearance; - - // HERE!!! Do the initial attachments right here - // first agent upon login is a root agent by design. - // All other AddNewClient calls find aCircuit.child to be true - if (aCircuit == null || (aCircuit != null && aCircuit.child == false)) - { - sp.IsChildAgent = false; - Util.FireAndForget(delegate(object o) { sp.RezAttachments(); }); - } + sp.IsChildAgent = false; + Util.FireAndForget(delegate(object o) { sp.RezAttachments(); }); } } @@ -2997,25 +2959,6 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// Create a child agent scene presence and add it to this scene. - /// - /// - /// - protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client) - { - CheckHeartbeat(); - AvatarAppearance appearance = null; - GetAvatarAppearance(client, out appearance); - - ScenePresence avatar = m_sceneGraph.CreateAndAddChildScenePresence(client, appearance); - //avatar.KnownRegions = GetChildrenSeeds(avatar.UUID); - - m_eventManager.TriggerOnNewPresence(avatar); - - return avatar; - } - - /// /// Get the avatar apperance for the given client. /// /// diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index a2ed54f..969ff13 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -73,7 +73,6 @@ namespace OpenSim.Region.Framework.Scenes protected List m_scenePresenceArray = new List(); protected internal EntityManager Entities = new EntityManager(); - protected internal Dictionary RestorePresences = new Dictionary(); protected RegionInfo m_regInfo; protected Scene m_parentScene; @@ -564,8 +563,8 @@ namespace OpenSim.Region.Framework.Scenes { ScenePresence newAvatar = null; + // ScenePresence always defaults to child agent newAvatar = new ScenePresence(client, m_parentScene, m_regInfo, appearance); - newAvatar.IsChildAgent = true; AddScenePresence(newAvatar); @@ -578,6 +577,7 @@ namespace OpenSim.Region.Framework.Scenes /// protected internal void AddScenePresence(ScenePresence presence) { + // Always a child when added to the scene bool child = presence.IsChildAgent; if (child) -- cgit v1.1 From 17801bd78b339a2a85b318f87f8deae11adb8dc2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 27 Jan 2011 04:14:41 +0100 Subject: Add a TeleportFlags member to SP so we can tell how we got there. --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++++ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 +++++++++++ 2 files changed, 15 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 71d0f09..8edf3d3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3279,6 +3279,10 @@ namespace OpenSim.Region.Framework.Scenes } + // Let the SP know how we got here. This has a lot of interesting + // uses down the line. + sp.TeleportFlags = (TeleportFlags)teleportFlags; + // In all cases, add or update the circuit data with the new agent circuit data and teleport flags agent.teleportFlags = teleportFlags; m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fa2c7b5..1c276fa 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -130,6 +130,13 @@ namespace OpenSim.Region.Framework.Scenes private bool m_updateflag; private byte m_movementflag; private Vector3? m_forceToApply; + private TeleportFlags m_teleportFlags; + public TeleportFlags TeleportFlags + { + get { return m_teleportFlags; } + set { m_teleportFlags = value; } + } + private uint m_requestedSitTargetID; private UUID m_requestedSitTargetUUID; public bool SitGround = false; @@ -949,6 +956,10 @@ namespace OpenSim.Region.Framework.Scenes /// public void MakeChildAgent() { + // Reset these so that teleporting in and walking out isn't seen + // as teleporting back + m_teleportFlags = TeleportFlags.Default; + // It looks like m_animator is set to null somewhere, and MakeChild // is called after that. Probably in aborted teleports. if (m_animator == null) -- cgit v1.1 From b0f641fa157a04b13b3ea16a33feb3cca6a90846 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 27 Jan 2011 05:46:31 +0100 Subject: Make it work --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8edf3d3..dc08b49 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2488,6 +2488,8 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance); m_eventManager.TriggerOnNewPresence(sp); + sp.TeleportFlags = (TeleportFlags)aCircuit.teleportFlags; + // HERE!!! Do the initial attachments right here // first agent upon login is a root agent by design. // All other AddNewClient calls find aCircuit.child to be true @@ -3267,6 +3269,10 @@ namespace OpenSim.Region.Framework.Scenes } else { + // Let the SP know how we got here. This has a lot of interesting + // uses down the line. + sp.TeleportFlags = (TeleportFlags)teleportFlags; + if (sp.IsChildAgent) { m_log.DebugFormat( @@ -3279,10 +3285,6 @@ namespace OpenSim.Region.Framework.Scenes } - // Let the SP know how we got here. This has a lot of interesting - // uses down the line. - sp.TeleportFlags = (TeleportFlags)teleportFlags; - // In all cases, add or update the circuit data with the new agent circuit data and teleport flags agent.teleportFlags = teleportFlags; m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); -- cgit v1.1