From 57519b6dba97d7e7a2de71af9d58c93b4750bde8 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 16 Jan 2008 18:35:34 +0000 Subject: * Store task inventory when an object is taken into agent inventory * This means that you can take an object from a region and rez it somewhere else, with its inventory intact. * As for earlier, at this stage only scripts can be placed in inventory * This isn't an efficient implementation, a better one will probably need to come along soonish --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 2fd4301..10f4141 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -184,21 +184,21 @@ namespace OpenSim.Region.Environment.Scenes } // Create new asset - // XXX Hardcoding the numbers is a temporary measure - need an enumeration for this - AssetBase asset = - CreateAsset(item.name, item.desc, 10, 10, data); + // XXX Hardcoding the numbers is a temporary measure - need an enumeration for this + // There may well be one in libsecondlife + AssetBase asset = CreateAsset(item.Name, item.Description, 10, 10, data); AssetCache.AddAsset(asset); // Update item with new asset - item.asset_id = asset.FullID; + item.AssetID = asset.FullID; group.UpdateInventoryItem(item); group.GetProperites(remoteClient); // Trigger rerunning of script (use TriggerRezScript event, see RezScript) if (isScriptRunning) { - group.StopScript(part.LocalID, item.item_id); - group.StartScript(part.LocalID, item.item_id); + group.StopScript(part.LocalID, item.ItemID); + group.StartScript(part.LocalID, item.ItemID); } } @@ -750,12 +750,14 @@ namespace OpenSim.Region.Environment.Scenes private void AddRezObject(string xmlData, LLVector3 pos) { SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); - group.GenerateNewIDs(); + group.ResetIDs(); AddEntity(group); group.AbsolutePosition = pos; SceneObjectPart rootPart = group.GetChildPart(group.UUID); rootPart.ApplySanePermissions(); group.ApplyPhysics(m_physicalPrim); + group.StartScripts(); + //bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0)&& m_physicalPrim); //if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) //{ @@ -772,6 +774,7 @@ namespace OpenSim.Region.Environment.Scenes // rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); // } + // rootPart.ScheduleFullUpdate(); } } -- cgit v1.1