From a1de9bc33f4f776f91e965af8bcf1a6bbc5deb41 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 29 Mar 2012 01:08:37 +0100 Subject: Revert "Add comment about setting client.SceneAgent in AddNewClient()" This reverts commit 964cae4f37120db34d0d3e2f08ab998215237dfd. --- OpenSim/Region/Framework/Scenes/Scene.cs | 3 --- 1 file changed, 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 44cd30a..60fe48f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2670,10 +2670,7 @@ namespace OpenSim.Region.Framework.Scenes sp.IsChildAgent ? "child" : "root", sp.Name, RegionInfo.RegionName); } - // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the - // client is for a root or child agent. client.SceneAgent = sp; - m_LastLogin = Util.EnvironmentTickCount(); // Cache the user's name -- cgit v1.1 From 93ac47f0d3968650bd7758ad0981e8e5d49b8138 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 29 Mar 2012 01:08:47 +0100 Subject: Revert "Simplify friends caching by only doing this for root agents - no functions require caching for child agents." We need to cache child agents so that friends object edit/delete permissions will work across boarders on regions hosted by different simulators. This reverts commit d9f7b8549b3cb9699eb8bd54242d31aac0f8241a. --- OpenSim/Region/Framework/Scenes/EventManager.cs | 3 +-- OpenSim/Region/Framework/Scenes/Scene.cs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index fe3438e..7993abe 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -71,7 +71,6 @@ namespace OpenSim.Region.Framework.Scenes /// Triggered when a new client is added to the scene. /// /// - /// This is triggered for both child and root agent client connections. /// Triggered before OnClientLogin. /// public event OnNewClientDelegate OnNewClient; @@ -192,7 +191,7 @@ namespace OpenSim.Region.Framework.Scenes public delegate void ClientClosed(UUID clientID, Scene scene); /// - /// Fired when a client is removed from a scene whether it's a child or a root agent. + /// Fired when a client is removed from a scene. /// /// /// At the point of firing, the scene still contains the client's scene presence. diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 60fe48f..c887b4e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2670,7 +2670,6 @@ namespace OpenSim.Region.Framework.Scenes sp.IsChildAgent ? "child" : "root", sp.Name, RegionInfo.RegionName); } - client.SceneAgent = sp; m_LastLogin = Util.EnvironmentTickCount(); // Cache the user's name -- cgit v1.1 From bd83676d6c01b59c5d2b55f81e5f3ce9885f450e Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 29 Mar 2012 01:13:08 +0100 Subject: Change namespace on CallingCardModule and correct interface file placemant. Also ass OpenSource header --- OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs b/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs new file mode 100644 index 0000000..17e6de35 --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenMetaverse; +using OpenSim.Framework; + +namespace OpenSim.Framework +{ + public interface ICallingCardModule + { + UUID CreateCallingCard(UUID userID, UUID creatorID, UUID folderID); + } +} -- cgit v1.1 From 62b1c807c2f1450cb29a7ba44b7e8c01c46383b3 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 29 Mar 2012 01:14:50 +0100 Subject: Also add OSS header to interface --- .../Framework/Interfaces/ICallingCardModule.cs | 29 +++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs b/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs index 17e6de35..69682ac 100644 --- a/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs @@ -1,4 +1,31 @@ -using System; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; using System.Collections.Generic; using System.Text; using OpenMetaverse; -- cgit v1.1 From 22a85b947a16074525343a56203211806ce16834 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 29 Mar 2012 01:26:30 +0100 Subject: Add back parts of reverted changes that were not concerned with child agent caching. This adds ScenePresence to IClientAPI.SceneAgent earlier on in the add client process so that its information is available to EventManager.OnNewClient() and OnClientLogin() Also add a code comment as to why we're caching friend information for child agents. --- OpenSim/Region/Framework/Scenes/EventManager.cs | 3 ++- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 7993abe..fe3438e 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -71,6 +71,7 @@ namespace OpenSim.Region.Framework.Scenes /// Triggered when a new client is added to the scene. /// /// + /// This is triggered for both child and root agent client connections. /// Triggered before OnClientLogin. /// public event OnNewClientDelegate OnNewClient; @@ -191,7 +192,7 @@ namespace OpenSim.Region.Framework.Scenes public delegate void ClientClosed(UUID clientID, Scene scene); /// - /// Fired when a client is removed from a scene. + /// Fired when a client is removed from a scene whether it's a child or a root agent. /// /// /// At the point of firing, the scene still contains the client's scene presence. diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c887b4e..44cd30a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2670,6 +2670,10 @@ namespace OpenSim.Region.Framework.Scenes sp.IsChildAgent ? "child" : "root", sp.Name, RegionInfo.RegionName); } + // We must set this here so that TriggerOnNewClient and TriggerOnClientLogin can determine whether the + // client is for a root or child agent. + client.SceneAgent = sp; + m_LastLogin = Util.EnvironmentTickCount(); // Cache the user's name -- cgit v1.1 From 59157d9d63c0e038ca0a619bfae1be3ed6f77677 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 30 Mar 2012 00:40:19 +0100 Subject: Add simple login test with online friends. Add IFriendsModule.GrantRights() for granting rights via a module call. Rename IFriendsModule.GetFriendPerms() -> GetRightsGrantedByFriend() to be more self-documenting and consistent with friends module terminology. Add some method doc. --- .../Region/Framework/Interfaces/IFriendsModule.cs | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs index 061799e..10bef1e 100644 --- a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs @@ -55,7 +55,27 @@ namespace OpenSim.Region.Framework.Interfaces /// void RemoveFriendship(IClientAPI client, UUID exFriendID); - uint GetFriendPerms(UUID PrincipalID, UUID FriendID); + /// + /// Get permissions granted by a friend. + /// + /// The user. + /// The friend that granted. + /// The permissions. These come from the FriendRights enum. + int GetRightsGrantedByFriend(UUID PrincipalID, UUID FriendID); + + /// + /// Grant permissions for a friend. + /// + /// + /// This includes giving them the ability to see when the user is online and permission to edit the user's + /// objects. + /// Granting lower permissions than the friend currently has will rescind the extra permissions. + /// + /// The user granting the permissions. + /// The friend. + /// These come from the FriendRights enum. + void GrantRights(IClientAPI remoteClient, UUID friendID, int perms); + bool SendFriendsOnlineIfNeeded(IClientAPI client); } -} +} \ No newline at end of file -- cgit v1.1 From bce7964ac2b0e67ff8c8e5ab00bb45b93da219ad Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 30 Mar 2012 01:05:29 +0100 Subject: refactor: Move "friends show cache" console command out into separate FriendsCommandsModule. Expose required methods on IFriendsModule. Rename GetFriends() -> GetFriendsFromCache() for self-documentation --- .../Region/Framework/Interfaces/IFriendsModule.cs | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs index 10bef1e..7e87006 100644 --- a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs @@ -25,15 +25,32 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System.Collections.Generic; using OpenMetaverse; using OpenSim.Framework; -using System.Collections.Generic; +using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; namespace OpenSim.Region.Framework.Interfaces { public interface IFriendsModule { /// + /// Are friends cached on this simulator for a particular user? + /// + /// + /// + bool AreFriendsCached(UUID userID); + + /// + /// Get friends from local cache only + /// + /// + /// + /// An empty array if the user has no friends or friends have not been cached. + /// + FriendInfo[] GetFriendsFromCache(UUID userID); + + /// /// Add a friendship between two users. /// /// @@ -58,10 +75,10 @@ namespace OpenSim.Region.Framework.Interfaces /// /// Get permissions granted by a friend. /// - /// The user. - /// The friend that granted. + /// The user. + /// The friend that granted. /// The permissions. These come from the FriendRights enum. - int GetRightsGrantedByFriend(UUID PrincipalID, UUID FriendID); + int GetRightsGrantedByFriend(UUID userID, UUID friendID); /// /// Grant permissions for a friend. -- cgit v1.1 From 874140f950add3b698a3c75ab24727e62e83f329 Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Wed, 14 Mar 2012 23:33:22 +0100 Subject: fix Infinite loading on No Rez http://opensimulator.org/mantis/view.php?id=5932 --- OpenSim/Region/Framework/Scenes/Scene.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 44cd30a..954b76f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1971,10 +1971,16 @@ namespace OpenSim.Region.Framework.Scenes if (Permissions.CanRezObject(1, ownerID, pos)) { // rez ON the ground, not IN the ground - // pos.Z += 0.25F; The rez point should now be correct so that its not in the ground + // pos.Z += 0.25F; The rez point should now be correct so that its not in the ground AddNewPrim(ownerID, groupID, pos, rot, shape); } + else + { + IClientAPI client = null; + if (this.TryGetClient(ownerID, out client)) + client.SendAlertMessage("You cannot create objects here."); + } } public virtual SceneObjectGroup AddNewPrim( -- cgit v1.1 From 69fc8c4985ebb9e205b86114b7c4e3dd4063153b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 31 Mar 2012 01:07:14 +0100 Subject: minor: small message adjustment and unnecessary code elimination when notifying client of no build permission --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 954b76f..fc61571 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1978,7 +1978,7 @@ namespace OpenSim.Region.Framework.Scenes else { IClientAPI client = null; - if (this.TryGetClient(ownerID, out client)) + if (TryGetClient(ownerID, out client)) client.SendAlertMessage("You cannot create objects here."); } } -- cgit v1.1 From f0406f9fe2f7a1d4d135934280735a3fdc41935f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 31 Mar 2012 01:45:37 +0100 Subject: Rename SOG.HasChildPrim(uint) to SOG.ContainsPart(uint) to match existing ContainsPart method and remove method duplication. HasChildPrim is also misleading since the 'root' prim can also be returned. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 +-- .../Region/Framework/Scenes/SceneObjectGroup.cs | 47 +++++++++------------- 2 files changed, 21 insertions(+), 32 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 5c542d6..cd1366c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -860,7 +860,7 @@ namespace OpenSim.Region.Framework.Scenes if (sog != null) { - if (sog.HasChildPrim(localID)) + if (sog.ContainsPart(localID)) { // m_log.DebugFormat( // "[SCENE GRAPH]: Found scene object {0} {1} {2} containing part with local id {3} in {4}. Returning.", @@ -888,7 +888,7 @@ namespace OpenSim.Region.Framework.Scenes if (ent is SceneObjectGroup) { sog = (SceneObjectGroup)ent; - if (sog.HasChildPrim(localID)) + if (sog.ContainsPart(localID)) { lock (SceneObjectGroupsByLocalPartID) SceneObjectGroupsByLocalPartID[localID] = sog; @@ -926,7 +926,7 @@ namespace OpenSim.Region.Framework.Scenes if (ent is SceneObjectGroup) { sog = (SceneObjectGroup)ent; - if (sog.HasChildPrim(fullID)) + if (sog.ContainsPart(fullID)) { lock (SceneObjectGroupsByFullPartID) SceneObjectGroupsByFullPartID[fullID] = sog; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index afb5ccf..9d16beb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -338,6 +338,24 @@ namespace OpenSim.Region.Framework.Scenes return m_parts.ContainsKey(partID); } + /// + /// Does this group contain the given part? + /// should be able to remove these methods once we have a entity index in scene + /// + /// + /// + public bool ContainsPart(uint localID) + { + SceneObjectPart[] parts = m_parts.GetArray(); + for (int i = 0; i < parts.Length; i++) + { + if (parts[i].LocalId == localID) + return true; + } + + return false; + } + /// /// The root part of this scene object /// @@ -1911,35 +1929,6 @@ namespace OpenSim.Region.Framework.Scenes return null; } - /// - /// Does this group contain the child prim - /// should be able to remove these methods once we have a entity index in scene - /// - /// - /// - public bool HasChildPrim(UUID primID) - { - return m_parts.ContainsKey(primID); - } - - /// - /// Does this group contain the child prim - /// should be able to remove these methods once we have a entity index in scene - /// - /// - /// - public bool HasChildPrim(uint localID) - { - SceneObjectPart[] parts = m_parts.GetArray(); - for (int i = 0; i < parts.Length; i++) - { - if (parts[i].LocalId == localID) - return true; - } - - return false; - } - #endregion #region Packet Handlers -- cgit v1.1 From 32a953fed727fdadd65228b7c9282091da3521ac Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 31 Mar 2012 01:52:06 +0100 Subject: refactor: Rename SOG.GetChildPart() to GetPart() since it can also return the 'root' part. --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 +-- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 +-- .../Framework/Scenes/SceneObjectGroup.Inventory.cs | 8 ++--- .../Region/Framework/Scenes/SceneObjectGroup.cs | 40 +++++++++++----------- .../Framework/Scenes/SceneObjectPartInventory.cs | 2 +- 5 files changed, 29 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index fc61571..06f7c0f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1833,7 +1833,7 @@ namespace OpenSim.Region.Framework.Scenes { AddRestoredSceneObject(group, true, true); EventManager.TriggerOnSceneObjectLoaded(group); - SceneObjectPart rootPart = group.GetChildPart(group.UUID); + SceneObjectPart rootPart = group.GetPart(group.UUID); rootPart.Flags &= ~PrimFlags.Scripted; rootPart.TrimPermissions(); @@ -4174,7 +4174,7 @@ namespace OpenSim.Region.Framework.Scenes { if (ent is SceneObjectGroup) { - SceneObjectPart part = ((SceneObjectGroup)ent).GetChildPart(((SceneObjectGroup)ent).UUID); + SceneObjectPart part = ((SceneObjectGroup)ent).GetPart(((SceneObjectGroup)ent).UUID); if (part != null) { if (part.Name == cmdparams[2]) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index cd1366c..8a05772 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1015,7 +1015,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectGroup group = GetGroupByPrim(localID); if (group == null) return null; - return group.GetChildPart(localID); + return group.GetPart(localID); } /// @@ -1062,7 +1062,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectGroup group = GetGroupByPrim(fullID); if (group == null) return null; - return group.GetChildPart(fullID); + return group.GetPart(fullID); } /// diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index a73d9b6..10012d0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs @@ -96,7 +96,7 @@ namespace OpenSim.Region.Framework.Scenes UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID; - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { TaskInventoryItem taskItem = new TaskInventoryItem(); @@ -170,7 +170,7 @@ namespace OpenSim.Region.Framework.Scenes /// null if the item does not exist public TaskInventoryItem GetInventoryItem(uint primID, UUID itemID) { - SceneObjectPart part = GetChildPart(primID); + SceneObjectPart part = GetPart(primID); if (part != null) { return part.Inventory.GetInventoryItem(itemID); @@ -194,7 +194,7 @@ namespace OpenSim.Region.Framework.Scenes /// false if the item did not exist, true if the update occurred succesfully public bool UpdateInventoryItem(TaskInventoryItem item) { - SceneObjectPart part = GetChildPart(item.ParentPartID); + SceneObjectPart part = GetPart(item.ParentPartID); if (part != null) { part.Inventory.UpdateInventoryItem(item); @@ -214,7 +214,7 @@ namespace OpenSim.Region.Framework.Scenes public int RemoveInventoryItem(uint localID, UUID itemID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { int type = part.Inventory.RemoveInventoryItem(itemID); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 9d16beb..04b3766 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1127,7 +1127,7 @@ namespace OpenSim.Region.Framework.Scenes public UUID GetPartsFullID(uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { return part.UUID; @@ -1143,7 +1143,7 @@ namespace OpenSim.Region.Framework.Scenes } else { - SceneObjectPart part = GetChildPart(localId); + SceneObjectPart part = GetPart(localId); OnGrabPart(part, offsetPos, remoteClient); } } @@ -1904,8 +1904,8 @@ namespace OpenSim.Region.Framework.Scenes /// Get a part with a given UUID /// /// - /// null if a child part with the primID was not found - public SceneObjectPart GetChildPart(UUID primID) + /// null if a part with the primID was not found + public SceneObjectPart GetPart(UUID primID) { SceneObjectPart childPart; m_parts.TryGetValue(primID, out childPart); @@ -1916,8 +1916,8 @@ namespace OpenSim.Region.Framework.Scenes /// Get a part with a given local ID /// /// - /// null if a child part with the local ID was not found - public SceneObjectPart GetChildPart(uint localID) + /// null if a part with the local ID was not found + public SceneObjectPart GetPart(uint localID) { SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) @@ -2035,7 +2035,7 @@ namespace OpenSim.Region.Framework.Scenes /// The object group of the newly delinked prim. Null if part could not be found public SceneObjectGroup DelinkFromGroup(uint partID, bool sendEvents) { - SceneObjectPart linkPart = GetChildPart(partID); + SceneObjectPart linkPart = GetPart(partID); if (linkPart != null) { @@ -2326,7 +2326,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void SetPartName(string name, uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { part.Name = name; @@ -2335,7 +2335,7 @@ namespace OpenSim.Region.Framework.Scenes public void SetPartDescription(string des, uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { part.Description = des; @@ -2344,7 +2344,7 @@ namespace OpenSim.Region.Framework.Scenes public void SetPartText(string text, uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { part.SetText(text); @@ -2353,7 +2353,7 @@ namespace OpenSim.Region.Framework.Scenes public void SetPartText(string text, UUID partID) { - SceneObjectPart part = GetChildPart(partID); + SceneObjectPart part = GetPart(partID); if (part != null) { part.SetText(text); @@ -2362,7 +2362,7 @@ namespace OpenSim.Region.Framework.Scenes public string GetPartName(uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { return part.Name; @@ -2372,7 +2372,7 @@ namespace OpenSim.Region.Framework.Scenes public string GetPartDescription(uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { return part.Description; @@ -2390,7 +2390,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) { - SceneObjectPart selectionPart = GetChildPart(localID); + SceneObjectPart selectionPart = GetPart(localID); if (SetTemporary && Scene != null) { @@ -2427,7 +2427,7 @@ namespace OpenSim.Region.Framework.Scenes public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { part.UpdateExtraParam(type, inUse, data); @@ -2441,7 +2441,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void UpdateTextureEntry(uint localID, byte[] textureEntry) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { part.UpdateTextureEntry(textureEntry); @@ -2473,7 +2473,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { part.UpdateShape(shapeBlock); @@ -2685,7 +2685,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void UpdateSinglePosition(Vector3 pos, uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); // SceneObjectPart[] parts = m_parts.GetArray(); // for (int i = 0; i < parts.Length; i++) @@ -2824,7 +2824,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void UpdateSingleRotation(Quaternion rot, uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) @@ -2853,7 +2853,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void UpdateSingleRotation(Quaternion rot, Vector3 pos, uint localID) { - SceneObjectPart part = GetChildPart(localID); + SceneObjectPart part = GetPart(localID); if (part != null) { // m_log.DebugFormat( diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 71a9084..f7e123b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -623,7 +623,7 @@ namespace OpenSim.Region.Framework.Scenes group.ResetIDs(); - SceneObjectPart rootPart = group.GetChildPart(group.UUID); + SceneObjectPart rootPart = group.GetPart(group.UUID); // Since renaming the item in the inventory does not affect the name stored // in the serialization, transfer the correct name from the inventory to the -- cgit v1.1