From 41ad030a5aacaf0b0d43d08df2ff331368f88936 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 15 Dec 2008 20:32:49 +0000 Subject: * minor: method documentation and miscellaneous tidy --- .../Region/Environment/Scenes/Scene.Inventory.cs | 44 ++++++++++++---------- .../Region/Environment/Scenes/SceneObjectPart.cs | 15 ++++---- 2 files changed, 32 insertions(+), 27 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 5e16082..c98c4f3 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -284,6 +284,7 @@ namespace OpenSim.Region.Environment.Scenes { part.Inventory.RemoveScriptInstance(item.ItemID); } + // Update item with new asset item.AssetID = asset.FullID; group.UpdateInventoryItem(item); @@ -2050,21 +2051,21 @@ namespace OpenSim.Region.Environment.Scenes RezSelected, RemoveItem, fromTaskID, false); } - /// - /// Returns SceneObjectGroup or null from asset request. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// + /// + /// Rez an object into the scene from the user's inventory + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The SceneObjectGroup rezzed or null if rez was unsuccessful. public virtual SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart, UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) @@ -2141,7 +2142,7 @@ namespace OpenSim.Region.Environment.Scenes if (attachment) isAttachment = " Object was an attachment"; - m_log.Error("[OJECTREZ]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); + m_log.Error("[AGENT INVENTORY]: Error rezzing ItemID: " + itemID + " object has no rootpart." + isAttachment); } // Since renaming the item in the inventory does not affect the name stored @@ -2200,11 +2201,12 @@ namespace OpenSim.Region.Environment.Scenes group.ClearPartAttachmentData(); } } - - // Fire on_rez + if (!attachment) { + // Fire on_rez group.CreateScriptInstances(0, true, DefaultScriptEngine, 0); + rootPart.ScheduleFullUpdate(); } @@ -2230,14 +2232,15 @@ namespace OpenSim.Region.Environment.Scenes } /// - /// Rez an object in the scene + /// Rez an object into the scene from a prim's inventory. /// + /// /// /// /// /// /// - /// + /// The SceneObjectGroup rezzed or null if rez was unsuccessful public virtual SceneObjectGroup RezObject( SceneObjectPart sourcePart, TaskInventoryItem item, Vector3 pos, Quaternion rot, Vector3 vel, int param) @@ -2338,6 +2341,7 @@ namespace OpenSim.Region.Environment.Scenes DeRezObject(null, grp.RootPart.LocalId, grp.RootPart.GroupID, DeRezAction.Return, UUID.Zero); } + return true; } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 5a43df6..10a37ee 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1602,13 +1602,14 @@ if (m_shape != null) { public void GetProperties(IClientAPI client) { - client.SendObjectPropertiesReply(UUID.Zero, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, - _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, - ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, - ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, - ParentGroup.RootPart._baseMask, - ParentGroup.RootPart.ObjectSaleType, - ParentGroup.RootPart.SalePrice); + client.SendObjectPropertiesReply( + UUID.Zero, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, + _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, + ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, + ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, + ParentGroup.RootPart._baseMask, + ParentGroup.RootPart.ObjectSaleType, + ParentGroup.RootPart.SalePrice); } public UUID GetRootPartUUID() -- cgit v1.1