From 45f658890b67973e91384ce0958ddfbc675f000a Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 8 Jan 2011 01:46:52 +0000 Subject: [PATCH] Get a new avatar to wear the 'default' eyes by default. This now means that new avatars start off with all the body parts and clothing required to have an appearance in viewer 2. However, clothing and body part creation is hardcoded, this stuff needs to be made optional. Or even better, integrated with the existing 'default' avatar creation stuff hanging off the XMLRPC functions. Also, some sanity tweaking is required (e.g. creator is currently the zero ID) --- OpenSim/Framework/AvatarWearable.cs | 8 ++++++++ OpenSim/Services/InventoryService/XInventoryService.cs | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index 8e27596b85..d701d544f5 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs @@ -81,6 +81,11 @@ namespace OpenSim.Framework public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111"); public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120"); + + // No obvious external default appears for eyes, so these are specific to OpenSim! + // Does this matter? + public static readonly UUID DEFAULT_EYES_ITEM = new UUID("3a8d1e5c-998a-4c81-bdfb-89cd301e795e"); + public static readonly UUID DEFAULT_EYES_ASSET = new UUID("6522e74d-1660-4e7f-b601-6f48c1659a77"); // public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8"); // public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594"); @@ -240,6 +245,9 @@ namespace OpenSim.Framework // Pants defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET); + // Eyes + defaultWearables[EYES].Add(DEFAULT_EYES_ITEM, DEFAULT_EYES_ASSET); + // // Alpha // defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET); diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index f728241b8e..7fc1327ade 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs @@ -182,8 +182,8 @@ namespace OpenSim.Services.InventoryService defaultEyes.AssetType = (int)AssetType.Bodypart; defaultEyes.InvType = (int)InventoryType.Wearable; defaultEyes.Flags = (uint)WearableType.Eyes; - defaultEyes.ID = UUID.Random(); - defaultEyes.AssetID = UUID.Parse("6522e74d-1660-4e7f-b601-6f48c1659a77"); + defaultEyes.ID = AvatarWearable.DEFAULT_EYES_ITEM; + defaultEyes.AssetID = AvatarWearable.DEFAULT_EYES_ASSET; defaultEyes.Folder = bodypartFolder.ID; defaultEyes.CreatorId = UUID.Zero.ToString(); AddItem(defaultEyes);