diff options
Diffstat (limited to 'OpenSim/Region/Framework')
7 files changed, 138 insertions, 65 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs b/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs new file mode 100644 index 0000000..69682ac --- /dev/null +++ b/OpenSim/Region/Framework/Interfaces/ICallingCardModule.cs | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using OpenMetaverse; | ||
32 | using OpenSim.Framework; | ||
33 | |||
34 | namespace OpenSim.Framework | ||
35 | { | ||
36 | public interface ICallingCardModule | ||
37 | { | ||
38 | UUID CreateCallingCard(UUID userID, UUID creatorID, UUID folderID); | ||
39 | } | ||
40 | } | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs index 061799e..7e87006 100644 --- a/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IFriendsModule.cs | |||
@@ -25,15 +25,32 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System.Collections.Generic; | ||
28 | using OpenMetaverse; | 29 | using OpenMetaverse; |
29 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
30 | using System.Collections.Generic; | 31 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; |
31 | 32 | ||
32 | namespace OpenSim.Region.Framework.Interfaces | 33 | namespace OpenSim.Region.Framework.Interfaces |
33 | { | 34 | { |
34 | public interface IFriendsModule | 35 | public interface IFriendsModule |
35 | { | 36 | { |
36 | /// <summary> | 37 | /// <summary> |
38 | /// Are friends cached on this simulator for a particular user? | ||
39 | /// </summary> | ||
40 | /// <param name="userID"></param> | ||
41 | /// <returns></returns> | ||
42 | bool AreFriendsCached(UUID userID); | ||
43 | |||
44 | /// <summary> | ||
45 | /// Get friends from local cache only | ||
46 | /// </summary> | ||
47 | /// <param name="userID"></param> | ||
48 | /// <returns> | ||
49 | /// An empty array if the user has no friends or friends have not been cached. | ||
50 | /// </returns> | ||
51 | FriendInfo[] GetFriendsFromCache(UUID userID); | ||
52 | |||
53 | /// <summary> | ||
37 | /// Add a friendship between two users. | 54 | /// Add a friendship between two users. |
38 | /// </summary> | 55 | /// </summary> |
39 | /// <remarks> | 56 | /// <remarks> |
@@ -55,7 +72,27 @@ namespace OpenSim.Region.Framework.Interfaces | |||
55 | /// <param name="exFriendID"></param> | 72 | /// <param name="exFriendID"></param> |
56 | void RemoveFriendship(IClientAPI client, UUID exFriendID); | 73 | void RemoveFriendship(IClientAPI client, UUID exFriendID); |
57 | 74 | ||
58 | uint GetFriendPerms(UUID PrincipalID, UUID FriendID); | 75 | /// <summary> |
76 | /// Get permissions granted by a friend. | ||
77 | /// </summary> | ||
78 | /// <param name="userID">The user.</param> | ||
79 | /// <param name="friendID">The friend that granted.</param> | ||
80 | /// <returns>The permissions. These come from the FriendRights enum.</returns> | ||
81 | int GetRightsGrantedByFriend(UUID userID, UUID friendID); | ||
82 | |||
83 | /// <summary> | ||
84 | /// Grant permissions for a friend. | ||
85 | /// </summary> | ||
86 | /// <remarks> | ||
87 | /// This includes giving them the ability to see when the user is online and permission to edit the user's | ||
88 | /// objects. | ||
89 | /// Granting lower permissions than the friend currently has will rescind the extra permissions. | ||
90 | /// </remarks> | ||
91 | /// <param name="remoteClient">The user granting the permissions.</param> | ||
92 | /// <param name="friendID">The friend.</param> | ||
93 | /// <param name="perms">These come from the FriendRights enum.</param> | ||
94 | void GrantRights(IClientAPI remoteClient, UUID friendID, int perms); | ||
95 | |||
59 | bool SendFriendsOnlineIfNeeded(IClientAPI client); | 96 | bool SendFriendsOnlineIfNeeded(IClientAPI client); |
60 | } | 97 | } |
61 | } | 98 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index cf3270d..539ca14 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1883,7 +1883,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1883 | { | 1883 | { |
1884 | AddRestoredSceneObject(group, true, true); | 1884 | AddRestoredSceneObject(group, true, true); |
1885 | EventManager.TriggerOnSceneObjectLoaded(group); | 1885 | EventManager.TriggerOnSceneObjectLoaded(group); |
1886 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 1886 | SceneObjectPart rootPart = group.GetPart(group.UUID); |
1887 | rootPart.Flags &= ~PrimFlags.Scripted; | 1887 | rootPart.Flags &= ~PrimFlags.Scripted; |
1888 | rootPart.TrimPermissions(); | 1888 | rootPart.TrimPermissions(); |
1889 | 1889 | ||
@@ -2031,10 +2031,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2031 | if (Permissions.CanRezObject(1, ownerID, pos)) | 2031 | if (Permissions.CanRezObject(1, ownerID, pos)) |
2032 | { | 2032 | { |
2033 | // rez ON the ground, not IN the ground | 2033 | // rez ON the ground, not IN the ground |
2034 | // pos.Z += 0.25F; The rez point should now be correct so that its not in the ground | 2034 | // pos.Z += 0.25F; The rez point should now be correct so that its not in the ground |
2035 | 2035 | ||
2036 | AddNewPrim(ownerID, groupID, pos, rot, shape); | 2036 | AddNewPrim(ownerID, groupID, pos, rot, shape); |
2037 | } | 2037 | } |
2038 | else | ||
2039 | { | ||
2040 | IClientAPI client = null; | ||
2041 | if (TryGetClient(ownerID, out client)) | ||
2042 | client.SendAlertMessage("You cannot create objects here."); | ||
2043 | } | ||
2038 | } | 2044 | } |
2039 | 2045 | ||
2040 | public virtual SceneObjectGroup AddNewPrim( | 2046 | public virtual SceneObjectGroup AddNewPrim( |
@@ -4348,7 +4354,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4348 | { | 4354 | { |
4349 | if (ent is SceneObjectGroup) | 4355 | if (ent is SceneObjectGroup) |
4350 | { | 4356 | { |
4351 | SceneObjectPart part = ((SceneObjectGroup)ent).GetChildPart(((SceneObjectGroup)ent).UUID); | 4357 | SceneObjectPart part = ((SceneObjectGroup)ent).GetPart(((SceneObjectGroup)ent).UUID); |
4352 | if (part != null) | 4358 | if (part != null) |
4353 | { | 4359 | { |
4354 | if (part.Name == cmdparams[2]) | 4360 | if (part.Name == cmdparams[2]) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index ccc3f32..9fdbc54 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -941,7 +941,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
941 | 941 | ||
942 | if (sog != null) | 942 | if (sog != null) |
943 | { | 943 | { |
944 | if (sog.HasChildPrim(localID)) | 944 | if (sog.ContainsPart(localID)) |
945 | { | 945 | { |
946 | // m_log.DebugFormat( | 946 | // m_log.DebugFormat( |
947 | // "[SCENE GRAPH]: Found scene object {0} {1} {2} containing part with local id {3} in {4}. Returning.", | 947 | // "[SCENE GRAPH]: Found scene object {0} {1} {2} containing part with local id {3} in {4}. Returning.", |
@@ -969,7 +969,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
969 | if (ent is SceneObjectGroup) | 969 | if (ent is SceneObjectGroup) |
970 | { | 970 | { |
971 | sog = (SceneObjectGroup)ent; | 971 | sog = (SceneObjectGroup)ent; |
972 | if (sog.HasChildPrim(localID)) | 972 | if (sog.ContainsPart(localID)) |
973 | { | 973 | { |
974 | lock (SceneObjectGroupsByLocalPartID) | 974 | lock (SceneObjectGroupsByLocalPartID) |
975 | SceneObjectGroupsByLocalPartID[localID] = sog; | 975 | SceneObjectGroupsByLocalPartID[localID] = sog; |
@@ -1007,7 +1007,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1007 | if (ent is SceneObjectGroup) | 1007 | if (ent is SceneObjectGroup) |
1008 | { | 1008 | { |
1009 | sog = (SceneObjectGroup)ent; | 1009 | sog = (SceneObjectGroup)ent; |
1010 | if (sog.HasChildPrim(fullID)) | 1010 | if (sog.ContainsPart(fullID)) |
1011 | { | 1011 | { |
1012 | lock (SceneObjectGroupsByFullPartID) | 1012 | lock (SceneObjectGroupsByFullPartID) |
1013 | SceneObjectGroupsByFullPartID[fullID] = sog; | 1013 | SceneObjectGroupsByFullPartID[fullID] = sog; |
@@ -1096,7 +1096,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1096 | SceneObjectGroup group = GetGroupByPrim(localID); | 1096 | SceneObjectGroup group = GetGroupByPrim(localID); |
1097 | if (group == null) | 1097 | if (group == null) |
1098 | return null; | 1098 | return null; |
1099 | return group.GetChildPart(localID); | 1099 | return group.GetPart(localID); |
1100 | } | 1100 | } |
1101 | 1101 | ||
1102 | /// <summary> | 1102 | /// <summary> |
@@ -1143,7 +1143,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1143 | SceneObjectGroup group = GetGroupByPrim(fullID); | 1143 | SceneObjectGroup group = GetGroupByPrim(fullID); |
1144 | if (group == null) | 1144 | if (group == null) |
1145 | return null; | 1145 | return null; |
1146 | return group.GetChildPart(fullID); | 1146 | return group.GetPart(fullID); |
1147 | } | 1147 | } |
1148 | 1148 | ||
1149 | /// <summary> | 1149 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index f3660a5..2effa25 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
92 | 92 | ||
93 | UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID; | 93 | UUID newItemId = (copyItemID != UUID.Zero) ? copyItemID : item.ID; |
94 | 94 | ||
95 | SceneObjectPart part = GetChildPart(localID); | 95 | SceneObjectPart part = GetPart(localID); |
96 | if (part != null) | 96 | if (part != null) |
97 | { | 97 | { |
98 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 98 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
@@ -166,7 +166,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
166 | /// <returns>null if the item does not exist</returns> | 166 | /// <returns>null if the item does not exist</returns> |
167 | public TaskInventoryItem GetInventoryItem(uint primID, UUID itemID) | 167 | public TaskInventoryItem GetInventoryItem(uint primID, UUID itemID) |
168 | { | 168 | { |
169 | SceneObjectPart part = GetChildPart(primID); | 169 | SceneObjectPart part = GetPart(primID); |
170 | if (part != null) | 170 | if (part != null) |
171 | { | 171 | { |
172 | return part.Inventory.GetInventoryItem(itemID); | 172 | return part.Inventory.GetInventoryItem(itemID); |
@@ -190,7 +190,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
190 | /// <returns>false if the item did not exist, true if the update occurred succesfully</returns> | 190 | /// <returns>false if the item did not exist, true if the update occurred succesfully</returns> |
191 | public bool UpdateInventoryItem(TaskInventoryItem item) | 191 | public bool UpdateInventoryItem(TaskInventoryItem item) |
192 | { | 192 | { |
193 | SceneObjectPart part = GetChildPart(item.ParentPartID); | 193 | SceneObjectPart part = GetPart(item.ParentPartID); |
194 | if (part != null) | 194 | if (part != null) |
195 | { | 195 | { |
196 | part.Inventory.UpdateInventoryItem(item); | 196 | part.Inventory.UpdateInventoryItem(item); |
@@ -210,7 +210,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
210 | 210 | ||
211 | public int RemoveInventoryItem(uint localID, UUID itemID) | 211 | public int RemoveInventoryItem(uint localID, UUID itemID) |
212 | { | 212 | { |
213 | SceneObjectPart part = GetChildPart(localID); | 213 | SceneObjectPart part = GetPart(localID); |
214 | if (part != null) | 214 | if (part != null) |
215 | { | 215 | { |
216 | int type = part.Inventory.RemoveInventoryItem(itemID); | 216 | int type = part.Inventory.RemoveInventoryItem(itemID); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 90ad098..11fd721 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -412,6 +412,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
412 | return m_parts.ContainsKey(partID); | 412 | return m_parts.ContainsKey(partID); |
413 | } | 413 | } |
414 | 414 | ||
415 | /// <summary> | ||
416 | /// Does this group contain the given part? | ||
417 | /// should be able to remove these methods once we have a entity index in scene | ||
418 | /// </summary> | ||
419 | /// <param name="localID"></param> | ||
420 | /// <returns></returns> | ||
421 | public bool ContainsPart(uint localID) | ||
422 | { | ||
423 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
424 | for (int i = 0; i < parts.Length; i++) | ||
425 | { | ||
426 | if (parts[i].LocalId == localID) | ||
427 | return true; | ||
428 | } | ||
429 | |||
430 | return false; | ||
431 | } | ||
432 | |||
415 | /// <value> | 433 | /// <value> |
416 | /// The root part of this scene object | 434 | /// The root part of this scene object |
417 | /// </value> | 435 | /// </value> |
@@ -1636,7 +1654,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1636 | 1654 | ||
1637 | public UUID GetPartsFullID(uint localID) | 1655 | public UUID GetPartsFullID(uint localID) |
1638 | { | 1656 | { |
1639 | SceneObjectPart part = GetChildPart(localID); | 1657 | SceneObjectPart part = GetPart(localID); |
1640 | if (part != null) | 1658 | if (part != null) |
1641 | { | 1659 | { |
1642 | return part.UUID; | 1660 | return part.UUID; |
@@ -1652,7 +1670,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1652 | } | 1670 | } |
1653 | else | 1671 | else |
1654 | { | 1672 | { |
1655 | SceneObjectPart part = GetChildPart(localId); | 1673 | SceneObjectPart part = GetPart(localId); |
1656 | OnGrabPart(part, offsetPos, remoteClient); | 1674 | OnGrabPart(part, offsetPos, remoteClient); |
1657 | } | 1675 | } |
1658 | } | 1676 | } |
@@ -2513,8 +2531,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2513 | /// Get a part with a given UUID | 2531 | /// Get a part with a given UUID |
2514 | /// </summary> | 2532 | /// </summary> |
2515 | /// <param name="primID"></param> | 2533 | /// <param name="primID"></param> |
2516 | /// <returns>null if a child part with the primID was not found</returns> | 2534 | /// <returns>null if a part with the primID was not found</returns> |
2517 | public SceneObjectPart GetChildPart(UUID primID) | 2535 | public SceneObjectPart GetPart(UUID primID) |
2518 | { | 2536 | { |
2519 | SceneObjectPart childPart; | 2537 | SceneObjectPart childPart; |
2520 | m_parts.TryGetValue(primID, out childPart); | 2538 | m_parts.TryGetValue(primID, out childPart); |
@@ -2525,8 +2543,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2525 | /// Get a part with a given local ID | 2543 | /// Get a part with a given local ID |
2526 | /// </summary> | 2544 | /// </summary> |
2527 | /// <param name="localID"></param> | 2545 | /// <param name="localID"></param> |
2528 | /// <returns>null if a child part with the local ID was not found</returns> | 2546 | /// <returns>null if a part with the local ID was not found</returns> |
2529 | public SceneObjectPart GetChildPart(uint localID) | 2547 | public SceneObjectPart GetPart(uint localID) |
2530 | { | 2548 | { |
2531 | SceneObjectPart[] parts = m_parts.GetArray(); | 2549 | SceneObjectPart[] parts = m_parts.GetArray(); |
2532 | for (int i = 0; i < parts.Length; i++) | 2550 | for (int i = 0; i < parts.Length; i++) |
@@ -2538,35 +2556,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2538 | return null; | 2556 | return null; |
2539 | } | 2557 | } |
2540 | 2558 | ||
2541 | /// <summary> | ||
2542 | /// Does this group contain the child prim | ||
2543 | /// should be able to remove these methods once we have a entity index in scene | ||
2544 | /// </summary> | ||
2545 | /// <param name="primID"></param> | ||
2546 | /// <returns></returns> | ||
2547 | public bool HasChildPrim(UUID primID) | ||
2548 | { | ||
2549 | return m_parts.ContainsKey(primID); | ||
2550 | } | ||
2551 | |||
2552 | /// <summary> | ||
2553 | /// Does this group contain the child prim | ||
2554 | /// should be able to remove these methods once we have a entity index in scene | ||
2555 | /// </summary> | ||
2556 | /// <param name="localID"></param> | ||
2557 | /// <returns></returns> | ||
2558 | public bool HasChildPrim(uint localID) | ||
2559 | { | ||
2560 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
2561 | for (int i = 0; i < parts.Length; i++) | ||
2562 | { | ||
2563 | if (parts[i].LocalId == localID) | ||
2564 | return true; | ||
2565 | } | ||
2566 | |||
2567 | return false; | ||
2568 | } | ||
2569 | |||
2570 | #endregion | 2559 | #endregion |
2571 | 2560 | ||
2572 | #region Packet Handlers | 2561 | #region Packet Handlers |
@@ -2720,7 +2709,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2720 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> | 2709 | /// <returns>The object group of the newly delinked prim. Null if part could not be found</returns> |
2721 | public SceneObjectGroup DelinkFromGroup(uint partID, bool sendEvents) | 2710 | public SceneObjectGroup DelinkFromGroup(uint partID, bool sendEvents) |
2722 | { | 2711 | { |
2723 | SceneObjectPart linkPart = GetChildPart(partID); | 2712 | SceneObjectPart linkPart = GetPart(partID); |
2724 | 2713 | ||
2725 | if (linkPart != null) | 2714 | if (linkPart != null) |
2726 | { | 2715 | { |
@@ -3024,7 +3013,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3024 | /// <param name="localID"></param> | 3013 | /// <param name="localID"></param> |
3025 | public void SetPartName(string name, uint localID) | 3014 | public void SetPartName(string name, uint localID) |
3026 | { | 3015 | { |
3027 | SceneObjectPart part = GetChildPart(localID); | 3016 | SceneObjectPart part = GetPart(localID); |
3028 | if (part != null) | 3017 | if (part != null) |
3029 | { | 3018 | { |
3030 | part.Name = name; | 3019 | part.Name = name; |
@@ -3033,7 +3022,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3033 | 3022 | ||
3034 | public void SetPartDescription(string des, uint localID) | 3023 | public void SetPartDescription(string des, uint localID) |
3035 | { | 3024 | { |
3036 | SceneObjectPart part = GetChildPart(localID); | 3025 | SceneObjectPart part = GetPart(localID); |
3037 | if (part != null) | 3026 | if (part != null) |
3038 | { | 3027 | { |
3039 | part.Description = des; | 3028 | part.Description = des; |
@@ -3042,7 +3031,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3042 | 3031 | ||
3043 | public void SetPartText(string text, uint localID) | 3032 | public void SetPartText(string text, uint localID) |
3044 | { | 3033 | { |
3045 | SceneObjectPart part = GetChildPart(localID); | 3034 | SceneObjectPart part = GetPart(localID); |
3046 | if (part != null) | 3035 | if (part != null) |
3047 | { | 3036 | { |
3048 | part.SetText(text); | 3037 | part.SetText(text); |
@@ -3051,7 +3040,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3051 | 3040 | ||
3052 | public void SetPartText(string text, UUID partID) | 3041 | public void SetPartText(string text, UUID partID) |
3053 | { | 3042 | { |
3054 | SceneObjectPart part = GetChildPart(partID); | 3043 | SceneObjectPart part = GetPart(partID); |
3055 | if (part != null) | 3044 | if (part != null) |
3056 | { | 3045 | { |
3057 | part.SetText(text); | 3046 | part.SetText(text); |
@@ -3060,7 +3049,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3060 | 3049 | ||
3061 | public string GetPartName(uint localID) | 3050 | public string GetPartName(uint localID) |
3062 | { | 3051 | { |
3063 | SceneObjectPart part = GetChildPart(localID); | 3052 | SceneObjectPart part = GetPart(localID); |
3064 | if (part != null) | 3053 | if (part != null) |
3065 | { | 3054 | { |
3066 | return part.Name; | 3055 | return part.Name; |
@@ -3070,7 +3059,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3070 | 3059 | ||
3071 | public string GetPartDescription(uint localID) | 3060 | public string GetPartDescription(uint localID) |
3072 | { | 3061 | { |
3073 | SceneObjectPart part = GetChildPart(localID); | 3062 | SceneObjectPart part = GetPart(localID); |
3074 | if (part != null) | 3063 | if (part != null) |
3075 | { | 3064 | { |
3076 | return part.Description; | 3065 | return part.Description; |
@@ -3088,7 +3077,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3088 | /// <param name="SetVolumeDetect"></param> | 3077 | /// <param name="SetVolumeDetect"></param> |
3089 | public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) | 3078 | public void UpdatePrimFlags(uint localID, bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVolumeDetect) |
3090 | { | 3079 | { |
3091 | SceneObjectPart selectionPart = GetChildPart(localID); | 3080 | SceneObjectPart selectionPart = GetPart(localID); |
3092 | 3081 | ||
3093 | if (SetTemporary && Scene != null) | 3082 | if (SetTemporary && Scene != null) |
3094 | { | 3083 | { |
@@ -3148,7 +3137,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3148 | 3137 | ||
3149 | public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data) | 3138 | public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data) |
3150 | { | 3139 | { |
3151 | SceneObjectPart part = GetChildPart(localID); | 3140 | SceneObjectPart part = GetPart(localID); |
3152 | if (part != null) | 3141 | if (part != null) |
3153 | { | 3142 | { |
3154 | part.UpdateExtraParam(type, inUse, data); | 3143 | part.UpdateExtraParam(type, inUse, data); |
@@ -3173,7 +3162,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3173 | /// <param name="textureEntry"></param> | 3162 | /// <param name="textureEntry"></param> |
3174 | public void UpdateTextureEntry(uint localID, byte[] textureEntry) | 3163 | public void UpdateTextureEntry(uint localID, byte[] textureEntry) |
3175 | { | 3164 | { |
3176 | SceneObjectPart part = GetChildPart(localID); | 3165 | SceneObjectPart part = GetPart(localID); |
3177 | if (part != null) | 3166 | if (part != null) |
3178 | { | 3167 | { |
3179 | part.UpdateTextureEntry(textureEntry); | 3168 | part.UpdateTextureEntry(textureEntry); |
@@ -3205,7 +3194,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3205 | /// <param name="shapeBlock"></param> | 3194 | /// <param name="shapeBlock"></param> |
3206 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) | 3195 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) |
3207 | { | 3196 | { |
3208 | SceneObjectPart part = GetChildPart(localID); | 3197 | SceneObjectPart part = GetPart(localID); |
3209 | if (part != null) | 3198 | if (part != null) |
3210 | { | 3199 | { |
3211 | part.UpdateShape(shapeBlock); | 3200 | part.UpdateShape(shapeBlock); |
@@ -3395,7 +3384,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3395 | 3384 | ||
3396 | public void UpdateSinglePosition(Vector3 pos, uint localID) | 3385 | public void UpdateSinglePosition(Vector3 pos, uint localID) |
3397 | { | 3386 | { |
3398 | SceneObjectPart part = GetChildPart(localID); | 3387 | SceneObjectPart part = GetPart(localID); |
3399 | 3388 | ||
3400 | if (part != null) | 3389 | if (part != null) |
3401 | { | 3390 | { |
@@ -3508,7 +3497,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3508 | /// <param name="localID"></param> | 3497 | /// <param name="localID"></param> |
3509 | public void UpdateSingleRotation(Quaternion rot, uint localID) | 3498 | public void UpdateSingleRotation(Quaternion rot, uint localID) |
3510 | { | 3499 | { |
3511 | SceneObjectPart part = GetChildPart(localID); | 3500 | SceneObjectPart part = GetPart(localID); |
3501 | |||
3512 | SceneObjectPart[] parts = m_parts.GetArray(); | 3502 | SceneObjectPart[] parts = m_parts.GetArray(); |
3513 | 3503 | ||
3514 | if (part != null) | 3504 | if (part != null) |
@@ -3537,7 +3527,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3537 | /// <param name="localID"></param> | 3527 | /// <param name="localID"></param> |
3538 | public void UpdateSingleRotation(Quaternion rot, Vector3 pos, uint localID) | 3528 | public void UpdateSingleRotation(Quaternion rot, Vector3 pos, uint localID) |
3539 | { | 3529 | { |
3540 | SceneObjectPart part = GetChildPart(localID); | 3530 | SceneObjectPart part = GetPart(localID); |
3541 | if (part != null) | 3531 | if (part != null) |
3542 | { | 3532 | { |
3543 | if (m_rootPart.PhysActor != null) | 3533 | if (m_rootPart.PhysActor != null) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index ac44ce9..a2649ee 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -815,7 +815,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
815 | 815 | ||
816 | group.ResetIDs(); | 816 | group.ResetIDs(); |
817 | 817 | ||
818 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 818 | SceneObjectPart rootPart = group.GetPart(group.UUID); |
819 | 819 | ||
820 | // Since renaming the item in the inventory does not affect the name stored | 820 | // Since renaming the item in the inventory does not affect the name stored |
821 | // in the serialization, transfer the correct name from the inventory to the | 821 | // in the serialization, transfer the correct name from the inventory to the |