From d01535690254a347939bc8946d8c10e78a8ea577 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 3 Mar 2008 16:52:25 +0000 Subject: * Applied patch 708 from devalnor. Thanks devalnor! * ODE: Added support for larger box stacks. (they're slow, but they work) * ODEPlugin no longer tries to 'catch up' with the simulator frame rate if it gets behind. Catching up was causing a lot of problems with larger box stacks and other things that stall the simulator (like saving prim in the datastore) --- .../Region/Environment/Scenes/Scene.Inventory.cs | 45 ++++++++++++++++++---- .../Region/Environment/Scenes/SceneObjectPart.cs | 2 +- 2 files changed, 39 insertions(+), 8 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 e41f180..8481737 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -606,16 +606,47 @@ namespace OpenSim.Region.Environment.Scenes public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint primLocalID) { + SceneObjectGroup group = GetGroupByPrim(primLocalID); + if (group != null) { - // TODO Retrieve itemID from client's inventory to pass on - //group.AddInventoryItem(remoteClient, primLocalID, null); - m_log.InfoFormat( - "[PRIM INVENTORY]: " + - "Non script prim inventory not yet implemented!" - + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", - itemID, folderID, primLocalID, remoteClient.Name); + LLUUID copyID = LLUUID.Random(); + if (itemID != LLUUID.Zero) + { + CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); + + if (userInfo != null && userInfo.RootFolder != null) + { + InventoryItemBase item = userInfo.RootFolder.HasItem(itemID); + + // Try library + // XXX clumsy, possibly should be one call + if (null == item) + { + item = CommsManager.UserProfileCacheService.libraryRoot.HasItem(itemID); + } + + if (item != null) + { + + group.AddInventoryItem(remoteClient, primLocalID, item, copyID); + m_log.InfoFormat("[PRIMINVENTORY]: Update with item {0} requested of prim {1} for {2}", item.inventoryName, primLocalID, remoteClient.Name); + group.GetProperties(remoteClient); + + } + else + { + m_log.ErrorFormat( + "[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!", + itemID, remoteClient.Name); + } + + } + + } + + } else { diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 04fa03e..a6a5063 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -1844,7 +1844,7 @@ namespace OpenSim.Region.Environment.Scenes m_log.Info("[PHYSICS]: Physical Object went out of bounds."); RemFlag(LLObject.ObjectFlags.Physics); DoPhysicsPropertyUpdate(false, true); - m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); + //m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); } public virtual void OnGrab(LLVector3 offsetPos, IClientAPI remoteClient) -- cgit v1.1