Some useful comments

This commit is contained in:
cinder
2025-02-13 09:08:56 -06:00
parent 52d7200019
commit 7d7bbd4cae
3 changed files with 17 additions and 2 deletions

View File

@@ -848,6 +848,14 @@ namespace LibreMetaverse
foreach (KeyValuePair<string, OSD> o in linksOsd)
{
var link = (OSDMap)o.Value;
/*
* Objects that have been attached in-world prior to being stored on the
* asset server are stored with the InventoryType of 0 (Texture)
* instead of 17 (Attachment)
*
* This corrects that behavior by forcing Object Asset types that have an
* invalid InventoryType with the proper InventoryType of Attachment.
*/
InventoryType type = (InventoryType)link["inv_type"].AsInteger();
if (type == InventoryType.Texture && (AssetType)link["type"].AsInteger() == AssetType.Object)
{

View File

@@ -333,7 +333,14 @@ namespace OpenMetaverse
public static InventoryItem FromOSD(OSD data)
{
OSDMap descItem = (OSDMap)data;
/*
* Objects that have been attached in-world prior to being stored on the
* asset server are stored with the InventoryType of 0 (Texture)
* instead of 17 (Attachment)
*
* This corrects that behavior by forcing Object Asset types that have an
* invalid InventoryType with the proper InventoryType of Attachment.
*/
InventoryType type = (InventoryType)descItem["inv_type"].AsInteger();
if (type == InventoryType.Texture && (AssetType)descItem["type"].AsInteger() == AssetType.Object)
{

View File

@@ -3437,7 +3437,7 @@ namespace OpenMetaverse
if (uint.TryParse(value, out timestamp))
creationDate = Utils.UnixTimeToDateTime(timestamp);
else
Logger.Log("Failed to parse creation_date " + value, Helpers.LogLevel.Warning);
Logger.Log($"Failed to parse creation_date: {value}", Helpers.LogLevel.Warning);
}
}
}