aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs33
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs20
4 files changed, 53 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index f344dcc..dd3208a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1472,20 +1472,27 @@ namespace OpenSim.Region.Framework.Scenes
1472// m_log.DebugFormat( 1472// m_log.DebugFormat(
1473// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()", 1473// "[PRIM INVENTORY]: Updating item {0} in {1} for UpdateTaskInventory()",
1474// currentItem.Name, part.Name); 1474// currentItem.Name, part.Name);
1475
1476 IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
1477 if (agentTransactions != null)
1478 {
1479 agentTransactions.HandleTaskItemUpdateFromTransaction(
1480 remoteClient, part, transactionID, currentItem);
1481 1475
1482 if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) 1476 // Viewers from at least Linden Lab 1.23 onwards use a capability to update script contents rather
1483 remoteClient.SendAgentAlertMessage("Notecard saved", false); 1477 // than UDP. With viewers from at least 1.23 onwards, changing properties on scripts (e.g. renaming) causes
1484 else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) 1478 // this to spew spurious errors and "thing saved" messages.
1485 remoteClient.SendAgentAlertMessage("Script saved", false); 1479 // Rather than retaining complexity in the code and removing useful error messages, I'm going to
1486 else 1480 // comment this section out. If this was still working for very old viewers and there is
1487 remoteClient.SendAgentAlertMessage("Item saved", false); 1481 // a large population using them which cannot upgrade to 1.23 or derivatives then we can revisit
1488 } 1482 // this - justincc
1483// IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
1484// if (agentTransactions != null)
1485// {
1486// agentTransactions.HandleTaskItemUpdateFromTransaction(
1487// remoteClient, part, transactionID, currentItem);
1488//
1489// if ((InventoryType)itemInfo.InvType == InventoryType.Notecard)
1490// remoteClient.SendAgentAlertMessage("Notecard saved", false);
1491// else if ((InventoryType)itemInfo.InvType == InventoryType.LSL)
1492// remoteClient.SendAgentAlertMessage("Script saved", false);
1493// else
1494// remoteClient.SendAgentAlertMessage("Item saved", false);
1495// }
1489 1496
1490 // Base ALWAYS has move 1497 // Base ALWAYS has move
1491 currentItem.BasePermissions |= (uint)PermissionMask.Move; 1498 currentItem.BasePermissions |= (uint)PermissionMask.Move;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index cad09b8..739c5fa 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -441,6 +441,12 @@ namespace OpenSim.Region.Framework.Scenes
441 } 441 }
442 } 442 }
443 443
444 public UUID LastOwnerID
445 {
446 get { return m_rootPart.LastOwnerID; }
447 set { m_rootPart.LastOwnerID = value; }
448 }
449
444 public UUID OwnerID 450 public UUID OwnerID
445 { 451 {
446 get { return m_rootPart.OwnerID; } 452 get { return m_rootPart.OwnerID; }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index ad3bcd5..36d3588 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4520,10 +4520,18 @@ namespace OpenSim.Region.Framework.Scenes
4520 /// <summary> 4520 /// <summary>
4521 /// Update the texture entry for this part. 4521 /// Update the texture entry for this part.
4522 /// </summary> 4522 /// </summary>
4523 /// <param name="textureEntry"></param> 4523 /// <param name="serializedTextureEntry"></param>
4524 public void UpdateTextureEntry(byte[] textureEntry) 4524 public void UpdateTextureEntry(byte[] serializedTextureEntry)
4525 {
4526 UpdateTextureEntry(new Primitive.TextureEntry(serializedTextureEntry, 0, serializedTextureEntry.Length));
4527 }
4528
4529 /// <summary>
4530 /// Update the texture entry for this part.
4531 /// </summary>
4532 /// <param name="newTex"></param>
4533 public void UpdateTextureEntry(Primitive.TextureEntry newTex)
4525 { 4534 {
4526 Primitive.TextureEntry newTex = new Primitive.TextureEntry(textureEntry, 0, textureEntry.Length);
4527 Primitive.TextureEntry oldTex = Shape.Textures; 4535 Primitive.TextureEntry oldTex = Shape.Textures;
4528 4536
4529 Changed changeFlags = 0; 4537 Changed changeFlags = 0;
@@ -4555,7 +4563,7 @@ namespace OpenSim.Region.Framework.Scenes
4555 break; 4563 break;
4556 } 4564 }
4557 4565
4558 m_shape.TextureEntry = textureEntry; 4566 m_shape.TextureEntry = newTex.GetBytes();
4559 if (changeFlags != 0) 4567 if (changeFlags != 0)
4560 TriggerScriptChangedEvent(changeFlags); 4568 TriggerScriptChangedEvent(changeFlags);
4561 UpdateFlag = UpdateRequired.FULL; 4569 UpdateFlag = UpdateRequired.FULL;
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 7c60ddd..3a08271 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1192,8 +1192,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1192 writer.WriteElementString("ObjectSaleType", sop.ObjectSaleType.ToString()); 1192 writer.WriteElementString("ObjectSaleType", sop.ObjectSaleType.ToString());
1193 writer.WriteElementString("OwnershipCost", sop.OwnershipCost.ToString()); 1193 writer.WriteElementString("OwnershipCost", sop.OwnershipCost.ToString());
1194 WriteUUID(writer, "GroupID", sop.GroupID, options); 1194 WriteUUID(writer, "GroupID", sop.GroupID, options);
1195 WriteUUID(writer, "OwnerID", sop.OwnerID, options); 1195
1196 WriteUUID(writer, "LastOwnerID", sop.LastOwnerID, options); 1196 UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.OwnerID;
1197 WriteUUID(writer, "OwnerID", ownerID, options);
1198
1199 UUID lastOwnerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.LastOwnerID;
1200 WriteUUID(writer, "LastOwnerID", lastOwnerID, options);
1201
1197 writer.WriteElementString("BaseMask", sop.BaseMask.ToString()); 1202 writer.WriteElementString("BaseMask", sop.BaseMask.ToString());
1198 writer.WriteElementString("OwnerMask", sop.OwnerMask.ToString()); 1203 writer.WriteElementString("OwnerMask", sop.OwnerMask.ToString());
1199 writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); 1204 writer.WriteElementString("GroupMask", sop.GroupMask.ToString());
@@ -1277,7 +1282,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1277 writer.WriteElementString("BasePermissions", item.BasePermissions.ToString()); 1282 writer.WriteElementString("BasePermissions", item.BasePermissions.ToString());
1278 writer.WriteElementString("CreationDate", item.CreationDate.ToString()); 1283 writer.WriteElementString("CreationDate", item.CreationDate.ToString());
1279 1284
1280
1281 WriteUUID(writer, "CreatorID", item.CreatorID, options); 1285 WriteUUID(writer, "CreatorID", item.CreatorID, options);
1282 1286
1283 if (item.CreatorData != null && item.CreatorData != string.Empty) 1287 if (item.CreatorData != null && item.CreatorData != string.Empty)
@@ -1298,10 +1302,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1298 writer.WriteElementString("InvType", item.InvType.ToString()); 1302 writer.WriteElementString("InvType", item.InvType.ToString());
1299 WriteUUID(writer, "ItemID", item.ItemID, options); 1303 WriteUUID(writer, "ItemID", item.ItemID, options);
1300 WriteUUID(writer, "OldItemID", item.OldItemID, options); 1304 WriteUUID(writer, "OldItemID", item.OldItemID, options);
1301 WriteUUID(writer, "LastOwnerID", item.LastOwnerID, options); 1305
1306 UUID lastOwnerID = options.ContainsKey("wipe-owners") ? UUID.Zero : item.LastOwnerID;
1307 WriteUUID(writer, "LastOwnerID", lastOwnerID, options);
1308
1302 writer.WriteElementString("Name", item.Name); 1309 writer.WriteElementString("Name", item.Name);
1303 writer.WriteElementString("NextPermissions", item.NextPermissions.ToString()); 1310 writer.WriteElementString("NextPermissions", item.NextPermissions.ToString());
1304 WriteUUID(writer, "OwnerID", item.OwnerID, options); 1311
1312 UUID ownerID = options.ContainsKey("wipe-owners") ? UUID.Zero : item.OwnerID;
1313 WriteUUID(writer, "OwnerID", ownerID, options);
1314
1305 writer.WriteElementString("CurrentPermissions", item.CurrentPermissions.ToString()); 1315 writer.WriteElementString("CurrentPermissions", item.CurrentPermissions.ToString());
1306 WriteUUID(writer, "ParentID", item.ParentID, options); 1316 WriteUUID(writer, "ParentID", item.ParentID, options);
1307 WriteUUID(writer, "ParentPartID", item.ParentPartID, options); 1317 WriteUUID(writer, "ParentPartID", item.ParentPartID, options);