aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-01-16 18:35:34 +0000
committerJustin Clarke Casey2008-01-16 18:35:34 +0000
commit57519b6dba97d7e7a2de71af9d58c93b4750bde8 (patch)
tree9597647ee1e70e50215b90bb116fede1ca7f8e27 /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parentFirst part of changing prim's permission flags to use the correct enum (libsl... (diff)
downloadopensim-SC_OLD-57519b6dba97d7e7a2de71af9d58c93b4750bde8.zip
opensim-SC_OLD-57519b6dba97d7e7a2de71af9d58c93b4750bde8.tar.gz
opensim-SC_OLD-57519b6dba97d7e7a2de71af9d58c93b4750bde8.tar.bz2
opensim-SC_OLD-57519b6dba97d7e7a2de71af9d58c93b4750bde8.tar.xz
* 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
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs17
1 files changed, 10 insertions, 7 deletions
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
184 } 184 }
185 185
186 // Create new asset 186 // Create new asset
187 // XXX Hardcoding the numbers is a temporary measure - need an enumeration for this 187 // XXX Hardcoding the numbers is a temporary measure - need an enumeration for this
188 AssetBase asset = 188 // There may well be one in libsecondlife
189 CreateAsset(item.name, item.desc, 10, 10, data); 189 AssetBase asset = CreateAsset(item.Name, item.Description, 10, 10, data);
190 AssetCache.AddAsset(asset); 190 AssetCache.AddAsset(asset);
191 191
192 // Update item with new asset 192 // Update item with new asset
193 item.asset_id = asset.FullID; 193 item.AssetID = asset.FullID;
194 group.UpdateInventoryItem(item); 194 group.UpdateInventoryItem(item);
195 group.GetProperites(remoteClient); 195 group.GetProperites(remoteClient);
196 196
197 // Trigger rerunning of script (use TriggerRezScript event, see RezScript) 197 // Trigger rerunning of script (use TriggerRezScript event, see RezScript)
198 if (isScriptRunning) 198 if (isScriptRunning)
199 { 199 {
200 group.StopScript(part.LocalID, item.item_id); 200 group.StopScript(part.LocalID, item.ItemID);
201 group.StartScript(part.LocalID, item.item_id); 201 group.StartScript(part.LocalID, item.ItemID);
202 } 202 }
203 } 203 }
204 204
@@ -750,12 +750,14 @@ namespace OpenSim.Region.Environment.Scenes
750 private void AddRezObject(string xmlData, LLVector3 pos) 750 private void AddRezObject(string xmlData, LLVector3 pos)
751 { 751 {
752 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); 752 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
753 group.GenerateNewIDs(); 753 group.ResetIDs();
754 AddEntity(group); 754 AddEntity(group);
755 group.AbsolutePosition = pos; 755 group.AbsolutePosition = pos;
756 SceneObjectPart rootPart = group.GetChildPart(group.UUID); 756 SceneObjectPart rootPart = group.GetChildPart(group.UUID);
757 rootPart.ApplySanePermissions(); 757 rootPart.ApplySanePermissions();
758 group.ApplyPhysics(m_physicalPrim); 758 group.ApplyPhysics(m_physicalPrim);
759 group.StartScripts();
760
759 //bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0)&& m_physicalPrim); 761 //bool UsePhysics = (((rootPart.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) > 0)&& m_physicalPrim);
760 //if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0) 762 //if ((rootPart.ObjectFlags & (uint) LLObject.ObjectFlags.Phantom) == 0)
761 //{ 763 //{
@@ -772,6 +774,7 @@ namespace OpenSim.Region.Environment.Scenes
772 // rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); 774 // rootPart.DoPhysicsPropertyUpdate(UsePhysics, true);
773 775
774 // } 776 // }
777 //
775 rootPart.ScheduleFullUpdate(); 778 rootPart.ScheduleFullUpdate();
776 } 779 }
777 } 780 }