diff options
author | Justin Clark-Casey (justincc) | 2013-08-19 20:00:42 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-08-19 20:00:42 +0100 |
commit | ef63abe9b12afa709e4ebe6bdb34e3712f626293 (patch) | |
tree | 454083cc744c41c1a24c9c6ab8ba898116897f38 /OpenSim | |
parent | Show number of connections each bot has established in "show bots" command. (diff) | |
parent | Allow updating the wearable type of wearables that have a type of 0. (diff) | |
download | opensim-SC_OLD-ef63abe9b12afa709e4ebe6bdb34e3712f626293.zip opensim-SC_OLD-ef63abe9b12afa709e4ebe6bdb34e3712f626293.tar.gz opensim-SC_OLD-ef63abe9b12afa709e4ebe6bdb34e3712f626293.tar.bz2 opensim-SC_OLD-ef63abe9b12afa709e4ebe6bdb34e3712f626293.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 8e4e307..c4b07a5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -416,6 +416,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
416 | // itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, | 416 | // itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, |
417 | // item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); | 417 | // item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); |
418 | 418 | ||
419 | bool sendUpdate = false; | ||
420 | |||
419 | if (itemUpd.NextPermissions != 0) // Use this to determine validity. Can never be 0 if valid | 421 | if (itemUpd.NextPermissions != 0) // Use this to determine validity. Can never be 0 if valid |
420 | { | 422 | { |
421 | // Create a set of base permissions that will not include export if the user | 423 | // Create a set of base permissions that will not include export if the user |
@@ -489,11 +491,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
489 | item.SalePrice = itemUpd.SalePrice; | 491 | item.SalePrice = itemUpd.SalePrice; |
490 | item.SaleType = itemUpd.SaleType; | 492 | item.SaleType = itemUpd.SaleType; |
491 | 493 | ||
492 | InventoryService.UpdateItem(item); | 494 | if (item.InvType == (int)InventoryType.Wearable && (item.Flags & 0xf) == 0 && (itemUpd.Flags & 0xf) != 0) |
495 | { | ||
496 | item.Flags = (uint)(item.Flags & 0xfffffff0) | (itemUpd.Flags & 0xf); | ||
497 | sendUpdate = true; | ||
498 | } | ||
493 | 499 | ||
494 | // We cannot send out a bulk update here, since this will cause editing of clothing to start | 500 | InventoryService.UpdateItem(item); |
495 | // failing frequently. Possibly this is a race with a separate transaction that uploads the asset. | ||
496 | // remoteClient.SendBulkUpdateInventory(item); | ||
497 | } | 501 | } |
498 | 502 | ||
499 | if (UUID.Zero != transactionID) | 503 | if (UUID.Zero != transactionID) |
@@ -503,6 +507,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
503 | AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); | 507 | AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); |
504 | } | 508 | } |
505 | } | 509 | } |
510 | else | ||
511 | { | ||
512 | // This MAY be problematic, if it is, another solution | ||
513 | // needs to be found. If inventory item flags are updated | ||
514 | // the viewer's notion of the item needs to be refreshed. | ||
515 | if (sendUpdate) | ||
516 | remoteClient.SendBulkUpdateInventory(item); | ||
517 | } | ||
506 | } | 518 | } |
507 | else | 519 | else |
508 | { | 520 | { |