From 1b850b4483956a8ef7cb5b44911b1e8dab9f7e86 Mon Sep 17 00:00:00 2001 From: MW Date: Fri, 27 Jul 2007 16:23:04 +0000 Subject: Should now have version 0.1 of our new ruth default avatar. At the moment, you only see your own avatar correctly, all other user's avatars show up as the old ruth. This will be fixed soon. We also need better clothing for the new ruth and to edit the body shape. To get this working you will need to delete your asset yap file and also in grid mode the user server needs to be updated. --- .../Framework/Communications/Cache/AssetCache.cs | 15 +++--- .../Communications/Cache/LibraryRootFolder.cs | 49 ++++++++++++++---- .../Framework/Communications/Capabilities/Caps.cs | 2 +- OpenSim/Framework/Data.MySQL/MySQLManager.cs | 4 +- OpenSim/Framework/Data/InventoryData.cs | 6 ++- OpenSim/Framework/General/Types/AgentWearable.cs | 10 +++- OpenSim/Region/ClientStack/ClientView.API.cs | 12 ++--- .../Environment/Scenes/Scene.PacketHandlers.cs | 2 +- .../GridInterfaces/Local/LocalAssetServer.cs | 60 ++++++++++++++++++++++ 9 files changed, 130 insertions(+), 30 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 32ba830..0c6d971 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -350,7 +350,6 @@ namespace OpenSim.Framework.Communications.Caches Transfer.TransferInfo.TargetType = 0; if (req.AssetRequestSource == 2) { - //Transfer.TransferInfo.Params = req.Params; Transfer.TransferInfo.Params = new byte[20]; Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); int assType = (int)req.AssetInf.Type; @@ -389,19 +388,19 @@ namespace OpenSim.Framework.Communications.Caches { chunk = new byte[req.AssetInf.Data.Length]; Array.Copy(req.AssetInf.Data, chunk, req.AssetInf.Data.Length); + TransferPacket.TransferData.Data = chunk; + TransferPacket.TransferData.Status = 1; + req.RequestUser.OutPacket(TransferPacket); } else { chunk = new byte[1000]; Array.Copy(req.AssetInf.Data, chunk, 1000); - } - TransferPacket.TransferData.Data = chunk; - TransferPacket.TransferData.Status = 0; - req.RequestUser.OutPacket(TransferPacket); + TransferPacket.TransferData.Data = chunk; + TransferPacket.TransferData.Status = 0; + req.RequestUser.OutPacket(TransferPacket); - if (req.AssetInf.Data.Length > 1000) - { TransferPacket = new TransferPacketPacket(); TransferPacket.TransferData.Packet = 1; TransferPacket.TransferData.ChannelType = 2; @@ -411,7 +410,7 @@ namespace OpenSim.Framework.Communications.Caches TransferPacket.TransferData.Data = chunk1; TransferPacket.TransferData.Status = 1; req.RequestUser.OutPacket(TransferPacket); - } + } } } diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index f807b2b..7813adc 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs @@ -43,7 +43,7 @@ namespace OpenSim.Framework.Communications.Caches item.assetID = new LLUUID("00000000-0000-0000-9999-000000000002"); item.inventoryDescription = "Plywood texture"; item.inventoryName = "Plywood"; - item.type = 0; + item.assetType = 0; item.parentFolderID = m_textureFolder.folderID; item.inventoryBasePermissions = 0x7FFFFFFF; item.inventoryEveryOnePermissions = 0x7FFFFFFF; @@ -58,7 +58,7 @@ namespace OpenSim.Framework.Communications.Caches item.assetID = new LLUUID("00000000-0000-0000-9999-000000000003"); item.inventoryDescription = "Rocks texture"; item.inventoryName = "Rocks"; - item.type = 0; + item.assetType = 0; item.parentFolderID = m_textureFolder.folderID; item.inventoryBasePermissions = 0x7FFFFFFF; item.inventoryEveryOnePermissions = 0x7FFFFFFF; @@ -73,7 +73,7 @@ namespace OpenSim.Framework.Communications.Caches item.assetID = new LLUUID("00000000-0000-0000-9999-000000000001"); item.inventoryDescription = "Bricks texture"; item.inventoryName = "Bricks"; - item.type = 0; + item.assetType = 0; item.parentFolderID = m_textureFolder.folderID; item.inventoryBasePermissions = 0x7FFFFFFF; item.inventoryEveryOnePermissions = 0x7FFFFFFF; @@ -88,7 +88,7 @@ namespace OpenSim.Framework.Communications.Caches item.assetID = new LLUUID("00000000-0000-0000-9999-000000000004"); item.inventoryDescription = "Granite texture"; item.inventoryName = "Granite"; - item.type = 0; + item.assetType = 0; item.parentFolderID = m_textureFolder.folderID; item.inventoryBasePermissions = 0x7FFFFFFF; item.inventoryEveryOnePermissions = 0x7FFFFFFF; @@ -103,7 +103,7 @@ namespace OpenSim.Framework.Communications.Caches item.assetID = new LLUUID("00000000-0000-0000-9999-000000000005"); item.inventoryDescription = "Hardwood texture"; item.inventoryName = "Hardwood"; - item.type = 0; + item.assetType = 0; item.parentFolderID = m_textureFolder.folderID; item.inventoryBasePermissions = 0x7FFFFFFF; item.inventoryEveryOnePermissions = 0x7FFFFFFF; @@ -118,7 +118,8 @@ namespace OpenSim.Framework.Communications.Caches item.assetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); item.inventoryDescription = "Default Shape"; item.inventoryName = "Default Shape"; - item.type = 13; + item.assetType = 13; + item.invType = 18; item.parentFolderID = this.folderID; item.inventoryCurrentPermissions = 0; item.inventoryNextPermissions = 0; @@ -131,12 +132,41 @@ namespace OpenSim.Framework.Communications.Caches item.assetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); item.inventoryDescription = "Default Skin"; item.inventoryName = "Default Skin"; - item.type = 13; + item.assetType = 13; + item.invType = 18; item.parentFolderID = this.folderID; item.inventoryCurrentPermissions = 0; item.inventoryNextPermissions = 0; this.Items.Add(item.inventoryID, item); - + + item = new InventoryItemBase(); + item.avatarID = libOwner; + item.creatorsID = libOwner; + item.inventoryID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); + item.assetID = new LLUUID("00000000-38f9-1111-024e-222222111110"); + item.inventoryDescription = "Default Shirt"; + item.inventoryName = "Default Shirt"; + item.assetType = 5; + item.invType = 18; + item.parentFolderID = this.folderID; + item.inventoryCurrentPermissions = 0; + item.inventoryNextPermissions = 0; + this.Items.Add(item.inventoryID, item); + + item = new InventoryItemBase(); + item.avatarID = libOwner; + item.creatorsID = libOwner; + item.inventoryID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); + item.assetID = new LLUUID("00000000-38f9-1111-024e-222222111120"); + item.inventoryDescription = "Default Pants"; + item.inventoryName = "Default Pants"; + item.assetType = 5; + item.invType = 18; + item.parentFolderID = this.folderID; + item.inventoryCurrentPermissions = 0; + item.inventoryNextPermissions = 0; + this.Items.Add(item.inventoryID, item); + item = new InventoryItemBase(); item.avatarID = libOwner; item.creatorsID = libOwner; @@ -144,7 +174,8 @@ namespace OpenSim.Framework.Communications.Caches item.assetID = new LLUUID("00000000-0000-2222-3333-000000000001"); item.inventoryDescription = "Welcome"; item.inventoryName = "Welcome"; - item.type = 7; + item.assetType = 7; + item.invType = 7; item.parentFolderID = this.folderID; item.inventoryCurrentPermissions = (1 << 15); item.inventoryNextPermissions = (1 << 15); diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 5df66f4..a55297a 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -299,7 +299,7 @@ namespace OpenSim.Region.Capabilities private LLUUID newAssetID; private LLUUID inventoryItemID; private BaseHttpServer httpListener; - private bool SaveImages = true; + private bool SaveImages = false; private string m_assetName = ""; /// diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index affb8f3..3624c7d 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs @@ -405,7 +405,7 @@ namespace OpenSim.Framework.Data.MySQL item.inventoryName = (string)reader["inventoryName"]; item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString()); item.parentFolderID = new LLUUID((string)reader["parentFolderID"]); - item.type = Convert.ToInt32(reader["type"].ToString()); + item.assetType = Convert.ToInt32(reader["type"].ToString()); rows.Add(item); } @@ -474,7 +474,7 @@ namespace OpenSim.Framework.Data.MySQL Dictionary parameters = new Dictionary(); parameters["?inventoryID"] = item.inventoryID.ToStringHyphenated(); parameters["?assetID"] = item.assetID.ToStringHyphenated(); - parameters["?type"] = item.type.ToString(); + parameters["?type"] = item.assetType.ToString(); parameters["?parentFolderID"] = item.parentFolderID.ToStringHyphenated(); parameters["?avatarID"] = item.avatarID.ToStringHyphenated(); parameters["?inventoryName"] = item.inventoryName; diff --git a/OpenSim/Framework/Data/InventoryData.cs b/OpenSim/Framework/Data/InventoryData.cs index c43ff1a..a12b87b 100644 --- a/OpenSim/Framework/Data/InventoryData.cs +++ b/OpenSim/Framework/Data/InventoryData.cs @@ -46,7 +46,11 @@ namespace OpenSim.Framework.Data /// /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc) /// - public int type; + public int assetType; + /// + /// The type of inventory item. (Can be slightly different to the asset type + /// + public int invType; /// /// The folder this item is contained in /// diff --git a/OpenSim/Framework/General/Types/AgentWearable.cs b/OpenSim/Framework/General/Types/AgentWearable.cs index 8c704ce..1b287a9 100644 --- a/OpenSim/Framework/General/Types/AgentWearable.cs +++ b/OpenSim/Framework/General/Types/AgentWearable.cs @@ -51,8 +51,14 @@ namespace OpenSim.Framework.Types defaultWearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); defaultWearables[0].ItemID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"); - //defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); - //defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); + defaultWearables[1].ItemID = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"); + defaultWearables[1].AssetID = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"); + + defaultWearables[4].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"); + defaultWearables[4].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111110"); + + defaultWearables[5].ItemID = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"); + defaultWearables[5].AssetID = new LLUUID("00000000-38f9-1111-024e-222222111120"); return defaultWearables; } } diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 9a296f1..2733f0a 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs @@ -541,14 +541,14 @@ namespace OpenSim.Region.ClientStack descend.ItemData[i].FolderID = item.parentFolderID; descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); descend.ItemData[i].GroupMask = 0; - descend.ItemData[i].InvType = (sbyte)item.type; + descend.ItemData[i].InvType = (sbyte)item.invType; descend.ItemData[i].Name = enc.GetBytes(item.inventoryName+ "\0"); descend.ItemData[i].NextOwnerMask = item.inventoryNextPermissions; descend.ItemData[i].OwnerID = item.avatarID; descend.ItemData[i].OwnerMask = item.inventoryCurrentPermissions; descend.ItemData[i].SalePrice = 0; descend.ItemData[i].SaleType = 0; - descend.ItemData[i].Type = (sbyte)item.type; + descend.ItemData[i].Type = (sbyte)item.assetType; descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, descend.ItemData[i].InvType, descend.ItemData[i].Type, descend.ItemData[i].AssetID, descend.ItemData[i].GroupID, 100,descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID, descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); i++; @@ -577,14 +577,14 @@ namespace OpenSim.Region.ClientStack inventoryReply.InventoryData[0].FolderID = item.parentFolderID; inventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); inventoryReply.InventoryData[0].GroupMask = 0; - inventoryReply.InventoryData[0].InvType = (sbyte)item.type; + inventoryReply.InventoryData[0].InvType = (sbyte)item.invType; inventoryReply.InventoryData[0].Name = enc.GetBytes(item.inventoryName + "\0"); inventoryReply.InventoryData[0].NextOwnerMask = item.inventoryNextPermissions; inventoryReply.InventoryData[0].OwnerID = item.avatarID; inventoryReply.InventoryData[0].OwnerMask = item.inventoryCurrentPermissions; inventoryReply.InventoryData[0].SalePrice = 0; inventoryReply.InventoryData[0].SaleType = 0; - inventoryReply.InventoryData[0].Type = (sbyte)item.type; + inventoryReply.InventoryData[0].Type = (sbyte)item.assetType; inventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, inventoryReply.InventoryData[0].InvType, inventoryReply.InventoryData[0].Type, inventoryReply.InventoryData[0].AssetID, inventoryReply.InventoryData[0].GroupID, 100, inventoryReply.InventoryData[0].OwnerID, inventoryReply.InventoryData[0].CreatorID, inventoryReply.InventoryData[0].ItemID, inventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); this.OutPacket(inventoryReply); @@ -610,14 +610,14 @@ namespace OpenSim.Region.ClientStack InventoryReply.InventoryData[0].FolderID = Item.parentFolderID; InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); InventoryReply.InventoryData[0].GroupMask = 0; - InventoryReply.InventoryData[0].InvType =(sbyte) Item.type; + InventoryReply.InventoryData[0].InvType =(sbyte) Item.invType; InventoryReply.InventoryData[0].Name = enc.GetBytes(Item.inventoryName + "\0"); InventoryReply.InventoryData[0].NextOwnerMask = Item.inventoryNextPermissions; InventoryReply.InventoryData[0].OwnerID = Item.avatarID; InventoryReply.InventoryData[0].OwnerMask = Item.inventoryCurrentPermissions; InventoryReply.InventoryData[0].SalePrice = 100; InventoryReply.InventoryData[0].SaleType = 0; - InventoryReply.InventoryData[0].Type =(sbyte) Item.type; + InventoryReply.InventoryData[0].Type =(sbyte) Item.assetType; InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); OutPacket(InventoryReply); diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 11c2030..70bd003 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -688,7 +688,7 @@ namespace OpenSim.Region.Environment.Scenes item.assetID = asset.FullID; item.inventoryDescription = description; item.inventoryName = name; - item.type = invType; + item.assetType = invType; item.parentFolderID = folderID; item.inventoryCurrentPermissions = 2147483647; item.inventoryNextPermissions = nextOwnerMask; diff --git a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs index 919ad6c..38bf9bf 100644 --- a/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs +++ b/OpenSim/Region/GridInterfaces/Local/LocalAssetServer.cs @@ -246,6 +246,40 @@ namespace OpenSim.Region.GridInterfaces.Local db.Set(store); db.Commit(); + Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-0000-1111-9999-000000000010"); + Image.Name = "Female Body Texture"; + this.LoadAsset(Image, true, "femalebody.jp2"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + + Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-0000-1111-9999-000000000011"); + Image.Name = "Female Bottom Texture"; + this.LoadAsset(Image, true, "femalebottom.jp2"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + + Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-0000-1111-9999-000000000012"); + Image.Name = "Female Face Texture"; + this.LoadAsset(Image, true, "femaleface.jp2"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + + /* Image = new AssetBase(); Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000008"); @@ -286,6 +320,32 @@ namespace OpenSim.Region.GridInterfaces.Local db.Commit(); Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-38f9-1111-024e-222222111110"); + Image.Name = "Shirt"; + Image.Type = 5; + Image.InvType = 18; + this.LoadAsset(Image, false, "newshirt.dat"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + + Image = new AssetBase(); + Image.FullID = new LLUUID("00000000-38f9-1111-024e-222222111120"); + Image.Name = "Shirt"; + Image.Type = 5; + Image.InvType = 18; + this.LoadAsset(Image, false, "newpants.dat"); + store = new AssetStorage(); + store.Data = Image.Data; + store.Name = Image.Name; + store.UUID = Image.FullID; + db.Set(store); + db.Commit(); + + Image = new AssetBase(); Image.FullID = new LLUUID("00000000-0000-2222-3333-000000000001"); Image.Name = "WelcomeNote"; Image.Type = 7; -- cgit v1.1