aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorMW2007-08-24 11:42:44 +0000
committerMW2007-08-24 11:42:44 +0000
commitdf73446beeb53de5b504111d219c72291de05585 (patch)
tree3894f4a5a48a75abd038f4135f65144b9a7033a6 /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parentUpdated sqlite3.dll to version 3.4.2 (diff)
downloadopensim-SC_OLD-df73446beeb53de5b504111d219c72291de05585.zip
opensim-SC_OLD-df73446beeb53de5b504111d219c72291de05585.tar.gz
opensim-SC_OLD-df73446beeb53de5b504111d219c72291de05585.tar.bz2
opensim-SC_OLD-df73446beeb53de5b504111d219c72291de05585.tar.xz
Scripts are now copied into a prim (ie new copy placed in the prim) rather than moved into there.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs14
1 files changed, 6 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 4458a4d..4b30a80 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -233,6 +233,7 @@ namespace OpenSim.Region.Environment.Scenes
233 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID) 233 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
234 { 234 {
235 CachedUserInfo userInfo = commsManager.UserProfiles.GetUserDetails(remoteClient.AgentId); 235 CachedUserInfo userInfo = commsManager.UserProfiles.GetUserDetails(remoteClient.AgentId);
236 LLUUID copyID = LLUUID.Random();
236 if (userInfo != null) 237 if (userInfo != null)
237 { 238 {
238 if (userInfo.RootFolder != null) 239 if (userInfo.RootFolder != null)
@@ -251,7 +252,7 @@ namespace OpenSim.Region.Environment.Scenes
251 { 252 {
252 string script = Util.FieldToString(rezAsset.Data); 253 string script = Util.FieldToString(rezAsset.Data);
253 //Console.WriteLine("rez script "+script); 254 //Console.WriteLine("rez script "+script);
254 this.EventManager.TriggerRezScript(localID, itemID, script); 255 this.EventManager.TriggerRezScript(localID, copyID, script);
255 rezzed = true; 256 rezzed = true;
256 } 257 }
257 else 258 else
@@ -262,7 +263,7 @@ namespace OpenSim.Region.Environment.Scenes
262 { 263 {
263 string script = Util.FieldToString(rezAsset.Data); 264 string script = Util.FieldToString(rezAsset.Data);
264 // Console.WriteLine("rez script " + script); 265 // Console.WriteLine("rez script " + script);
265 this.EventManager.TriggerRezScript(localID, itemID, script); 266 this.EventManager.TriggerRezScript(localID, copyID, script);
266 rezzed = true; 267 rezzed = true;
267 } 268 }
268 } 269 }
@@ -277,13 +278,10 @@ namespace OpenSim.Region.Environment.Scenes
277 hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); 278 hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
278 if (hasPrim != false) 279 if (hasPrim != false)
279 { 280 {
280 bool added = ((SceneObjectGroup)ent).AddInventoryItem(remoteClient, localID, item); 281
282 bool added = ((SceneObjectGroup)ent).AddInventoryItem(remoteClient, localID, item, copyID);
281 ((SceneObjectGroup)ent).GetProperites(remoteClient); 283 ((SceneObjectGroup)ent).GetProperites(remoteClient);
282 if (added) 284
283 {
284 userInfo.DeleteItem(remoteClient.AgentId, item);
285 remoteClient.SendRemoveInventoryItem(itemID);
286 }
287 } 285 }
288 } 286 }
289 } 287 }