From 818ed2032aa4e6c0a9ede3598d64f0c7960135c4 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 30 Oct 2010 00:41:36 +0100 Subject: READ CAREFULLY!!! This is a BROKEN commit. It is UNTESTED and INCOMPLETE. It contains a major interface version bump and will NOT work with earlier grid services. This is preliminary work that will lead to layers support. Rest appearance services are commented out completely, they will have to be adapted by someone who actually uses them. Remote admin is working, but has no layers support. There is no layers support in the database. Login likely won't work. You have been warned. --- OpenSim/Services/Interfaces/IAvatarService.cs | 132 +++++++++++++++----------- 1 file changed, 78 insertions(+), 54 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index eaa6534..a029fbc 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -149,33 +149,33 @@ namespace OpenSim.Services.Interfaces Data["Serial"] = appearance.Serial.ToString(); // Wearables Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); - Data["BodyItem"] = appearance.BodyItem.ToString(); - Data["EyesItem"] = appearance.EyesItem.ToString(); - Data["GlovesItem"] = appearance.GlovesItem.ToString(); - Data["HairItem"] = appearance.HairItem.ToString(); - Data["JacketItem"] = appearance.JacketItem.ToString(); - Data["PantsItem"] = appearance.PantsItem.ToString(); - Data["ShirtItem"] = appearance.ShirtItem.ToString(); - Data["ShoesItem"] = appearance.ShoesItem.ToString(); - Data["SkinItem"] = appearance.SkinItem.ToString(); - Data["SkirtItem"] = appearance.SkirtItem.ToString(); - Data["SocksItem"] = appearance.SocksItem.ToString(); - Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString(); - Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString(); - - Data["BodyAsset"] = appearance.BodyAsset.ToString(); - Data["EyesAsset"] = appearance.EyesAsset.ToString(); - Data["GlovesAsset"] = appearance.GlovesAsset.ToString(); - Data["HairAsset"] = appearance.HairAsset.ToString(); - Data["JacketAsset"] = appearance.JacketAsset.ToString(); - Data["PantsAsset"] = appearance.PantsAsset.ToString(); - Data["ShirtAsset"] = appearance.ShirtAsset.ToString(); - Data["ShoesAsset"] = appearance.ShoesAsset.ToString(); - Data["SkinAsset"] = appearance.SkinAsset.ToString(); - Data["SkirtAsset"] = appearance.SkirtAsset.ToString(); - Data["SocksAsset"] = appearance.SocksAsset.ToString(); - Data["UnderPantsAsset"] = appearance.UnderPantsAsset.ToString(); - Data["UnderShirtAsset"] = appearance.UnderShirtAsset.ToString(); + Data["BodyItem"] = appearance.Wearables[AvatarWearable.BODY][0].ItemID.ToString(); + Data["EyesItem"] = appearance.Wearables[AvatarWearable.EYES][0].ItemID.ToString(); + Data["GlovesItem"] = appearance.Wearables[AvatarWearable.GLOVES][0].ItemID.ToString(); + Data["HairItem"] = appearance.Wearables[AvatarWearable.HAIR][0].ItemID.ToString(); + Data["JacketItem"] = appearance.Wearables[AvatarWearable.JACKET][0].ItemID.ToString(); + Data["PantsItem"] = appearance.Wearables[AvatarWearable.PANTS][0].ItemID.ToString(); + Data["ShirtItem"] = appearance.Wearables[AvatarWearable.SHIRT][0].ItemID.ToString(); + Data["ShoesItem"] = appearance.Wearables[AvatarWearable.SHOES][0].ItemID.ToString(); + Data["SkinItem"] = appearance.Wearables[AvatarWearable.SKIN][0].ItemID.ToString(); + Data["SkirtItem"] = appearance.Wearables[AvatarWearable.SKIRT][0].ItemID.ToString(); + Data["SocksItem"] = appearance.Wearables[AvatarWearable.SOCKS][0].ItemID.ToString(); + Data["UnderPantsItem"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].ItemID.ToString(); + Data["UnderShirtItem"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].ItemID.ToString(); + + Data["BodyAsset"] = appearance.Wearables[AvatarWearable.BODY][0].AssetID.ToString(); + Data["EyesAsset"] = appearance.Wearables[AvatarWearable.EYES][0].AssetID.ToString(); + Data["GlovesAsset"] = appearance.Wearables[AvatarWearable.GLOVES][0].AssetID.ToString(); + Data["HairAsset"] = appearance.Wearables[AvatarWearable.HAIR][0].AssetID.ToString(); + Data["JacketAsset"] = appearance.Wearables[AvatarWearable.JACKET][0].AssetID.ToString(); + Data["PantsAsset"] = appearance.Wearables[AvatarWearable.PANTS][0].AssetID.ToString(); + Data["ShirtAsset"] = appearance.Wearables[AvatarWearable.SHIRT][0].AssetID.ToString(); + Data["ShoesAsset"] = appearance.Wearables[AvatarWearable.SHOES][0].AssetID.ToString(); + Data["SkinAsset"] = appearance.Wearables[AvatarWearable.SKIN][0].AssetID.ToString(); + Data["SkirtAsset"] = appearance.Wearables[AvatarWearable.SKIRT][0].AssetID.ToString(); + Data["SocksAsset"] = appearance.Wearables[AvatarWearable.SOCKS][0].AssetID.ToString(); + Data["UnderPantsAsset"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].AssetID.ToString(); + Data["UnderShirtAsset"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].AssetID.ToString(); // Attachments List attachments = appearance.GetAttachments(); @@ -193,33 +193,57 @@ namespace OpenSim.Services.Interfaces appearance.Serial = Int32.Parse(Data["Serial"]); // Wearables - appearance.BodyItem = UUID.Parse(Data["BodyItem"]); - appearance.EyesItem = UUID.Parse(Data["EyesItem"]); - appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); - appearance.HairItem = UUID.Parse(Data["HairItem"]); - appearance.JacketItem = UUID.Parse(Data["JacketItem"]); - appearance.PantsItem = UUID.Parse(Data["PantsItem"]); - appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); - appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]); - appearance.SkinItem = UUID.Parse(Data["SkinItem"]); - appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); - appearance.SocksItem = UUID.Parse(Data["SocksItem"]); - appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); - appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]); - - appearance.BodyAsset = UUID.Parse(Data["BodyAsset"]); - appearance.EyesAsset = UUID.Parse(Data["EyesAsset"]); - appearance.GlovesAsset = UUID.Parse(Data["GlovesAsset"]); - appearance.HairAsset = UUID.Parse(Data["HairAsset"]); - appearance.JacketAsset = UUID.Parse(Data["JacketAsset"]); - appearance.PantsAsset = UUID.Parse(Data["PantsAsset"]); - appearance.ShirtAsset = UUID.Parse(Data["ShirtAsset"]); - appearance.ShoesAsset = UUID.Parse(Data["ShoesAsset"]); - appearance.SkinAsset = UUID.Parse(Data["SkinAsset"]); - appearance.SkirtAsset = UUID.Parse(Data["SkirtAsset"]); - appearance.SocksAsset = UUID.Parse(Data["SocksAsset"]); - appearance.UnderPantsAsset = UUID.Parse(Data["UnderPantsAsset"]); - appearance.UnderShirtAsset = UUID.Parse(Data["UnderShirtAsset"]); + appearance.Wearables[AvatarWearable.BODY].Wear( + UUID.Parse(Data["BodyItem"]), + UUID.Parse(Data["BodyAsset"])); + + appearance.Wearables[AvatarWearable.SKIN].Wear( + UUID.Parse(Data["SkinItem"]), + UUID.Parse(Data["SkinAsset"])); + + appearance.Wearables[AvatarWearable.HAIR].Wear( + UUID.Parse(Data["HairItem"]), + UUID.Parse(Data["HairAsset"])); + + appearance.Wearables[AvatarWearable.EYES].Wear( + UUID.Parse(Data["EyesItem"]), + UUID.Parse(Data["EyesAsset"])); + + appearance.Wearables[AvatarWearable.SHIRT].Wear( + UUID.Parse(Data["ShirtItem"]), + UUID.Parse(Data["ShirtAsset"])); + + appearance.Wearables[AvatarWearable.PANTS].Wear( + UUID.Parse(Data["PantsItem"]), + UUID.Parse(Data["PantsAsset"])); + + appearance.Wearables[AvatarWearable.SHOES].Wear( + UUID.Parse(Data["ShoesItem"]), + UUID.Parse(Data["ShoesAsset"])); + + appearance.Wearables[AvatarWearable.SOCKS].Wear( + UUID.Parse(Data["SocksItem"]), + UUID.Parse(Data["SocksAsset"])); + + appearance.Wearables[AvatarWearable.JACKET].Wear( + UUID.Parse(Data["JacketItem"]), + UUID.Parse(Data["JacketAsset"])); + + appearance.Wearables[AvatarWearable.GLOVES].Wear( + UUID.Parse(Data["GlovesItem"]), + UUID.Parse(Data["GlovesAsset"])); + + appearance.Wearables[AvatarWearable.UNDERSHIRT].Wear( + UUID.Parse(Data["UnderShirtItem"]), + UUID.Parse(Data["UnderShirtAsset"])); + + appearance.Wearables[AvatarWearable.UNDERPANTS].Wear( + UUID.Parse(Data["UnderPantsItem"]), + UUID.Parse(Data["UnderPantsAsset"])); + + appearance.Wearables[AvatarWearable.SKIRT].Wear( + UUID.Parse(Data["SkirtItem"]), + UUID.Parse(Data["SkirtAsset"])); // Attachments Dictionary attchs = new Dictionary(); -- cgit v1.1 From ff7da2082d4d44b34c3ef312d5ec5e88c94931e1 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 30 Oct 2010 02:25:25 +0100 Subject: This commit fixes all the appearance related null refs. Still can't log in, client displays a blank error box. --- OpenSim/Services/Interfaces/IAvatarService.cs | 117 +++++++++++++++----------- 1 file changed, 66 insertions(+), 51 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index a029fbc..186871a 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -190,60 +190,75 @@ namespace OpenSim.Services.Interfaces AvatarAppearance appearance = new AvatarAppearance(owner); try { - appearance.Serial = Int32.Parse(Data["Serial"]); + if (Data.ContainsKey("Serial")) + appearance.Serial = Int32.Parse(Data["Serial"]); // Wearables - appearance.Wearables[AvatarWearable.BODY].Wear( - UUID.Parse(Data["BodyItem"]), - UUID.Parse(Data["BodyAsset"])); + if (Data.ContainsKey("BodyItem")) + appearance.Wearables[AvatarWearable.BODY].Wear( + UUID.Parse(Data["BodyItem"]), + UUID.Parse(Data["BodyAsset"])); + + if (Data.ContainsKey("SkinItem")) + appearance.Wearables[AvatarWearable.SKIN].Wear( + UUID.Parse(Data["SkinItem"]), + UUID.Parse(Data["SkinAsset"])); + + if (Data.ContainsKey("HairItem")) + appearance.Wearables[AvatarWearable.HAIR].Wear( + UUID.Parse(Data["HairItem"]), + UUID.Parse(Data["HairAsset"])); + + if (Data.ContainsKey("EyesItem")) + appearance.Wearables[AvatarWearable.EYES].Wear( + UUID.Parse(Data["EyesItem"]), + UUID.Parse(Data["EyesAsset"])); + + if (Data.ContainsKey("ShirtItem")) + appearance.Wearables[AvatarWearable.SHIRT].Wear( + UUID.Parse(Data["ShirtItem"]), + UUID.Parse(Data["ShirtAsset"])); + + if (Data.ContainsKey("PantsItem")) + appearance.Wearables[AvatarWearable.PANTS].Wear( + UUID.Parse(Data["PantsItem"]), + UUID.Parse(Data["PantsAsset"])); + + if (Data.ContainsKey("ShoesItem")) + appearance.Wearables[AvatarWearable.SHOES].Wear( + UUID.Parse(Data["ShoesItem"]), + UUID.Parse(Data["ShoesAsset"])); + + if (Data.ContainsKey("SocksItem")) + appearance.Wearables[AvatarWearable.SOCKS].Wear( + UUID.Parse(Data["SocksItem"]), + UUID.Parse(Data["SocksAsset"])); + + if (Data.ContainsKey("JacketItem")) + appearance.Wearables[AvatarWearable.JACKET].Wear( + UUID.Parse(Data["JacketItem"]), + UUID.Parse(Data["JacketAsset"])); + + if (Data.ContainsKey("GlovesItem")) + appearance.Wearables[AvatarWearable.GLOVES].Wear( + UUID.Parse(Data["GlovesItem"]), + UUID.Parse(Data["GlovesAsset"])); + + if (Data.ContainsKey("UnderShirtItem")) + appearance.Wearables[AvatarWearable.UNDERSHIRT].Wear( + UUID.Parse(Data["UnderShirtItem"]), + UUID.Parse(Data["UnderShirtAsset"])); + + if (Data.ContainsKey("UnderPantsItem")) + appearance.Wearables[AvatarWearable.UNDERPANTS].Wear( + UUID.Parse(Data["UnderPantsItem"]), + UUID.Parse(Data["UnderPantsAsset"])); + + if (Data.ContainsKey("SkirtItem")) + appearance.Wearables[AvatarWearable.SKIRT].Wear( + UUID.Parse(Data["SkirtItem"]), + UUID.Parse(Data["SkirtAsset"])); - appearance.Wearables[AvatarWearable.SKIN].Wear( - UUID.Parse(Data["SkinItem"]), - UUID.Parse(Data["SkinAsset"])); - - appearance.Wearables[AvatarWearable.HAIR].Wear( - UUID.Parse(Data["HairItem"]), - UUID.Parse(Data["HairAsset"])); - - appearance.Wearables[AvatarWearable.EYES].Wear( - UUID.Parse(Data["EyesItem"]), - UUID.Parse(Data["EyesAsset"])); - - appearance.Wearables[AvatarWearable.SHIRT].Wear( - UUID.Parse(Data["ShirtItem"]), - UUID.Parse(Data["ShirtAsset"])); - - appearance.Wearables[AvatarWearable.PANTS].Wear( - UUID.Parse(Data["PantsItem"]), - UUID.Parse(Data["PantsAsset"])); - - appearance.Wearables[AvatarWearable.SHOES].Wear( - UUID.Parse(Data["ShoesItem"]), - UUID.Parse(Data["ShoesAsset"])); - - appearance.Wearables[AvatarWearable.SOCKS].Wear( - UUID.Parse(Data["SocksItem"]), - UUID.Parse(Data["SocksAsset"])); - - appearance.Wearables[AvatarWearable.JACKET].Wear( - UUID.Parse(Data["JacketItem"]), - UUID.Parse(Data["JacketAsset"])); - - appearance.Wearables[AvatarWearable.GLOVES].Wear( - UUID.Parse(Data["GlovesItem"]), - UUID.Parse(Data["GlovesAsset"])); - - appearance.Wearables[AvatarWearable.UNDERSHIRT].Wear( - UUID.Parse(Data["UnderShirtItem"]), - UUID.Parse(Data["UnderShirtAsset"])); - - appearance.Wearables[AvatarWearable.UNDERPANTS].Wear( - UUID.Parse(Data["UnderPantsItem"]), - UUID.Parse(Data["UnderPantsAsset"])); - - appearance.Wearables[AvatarWearable.SKIRT].Wear( - UUID.Parse(Data["SkirtItem"]), - UUID.Parse(Data["SkirtAsset"])); // Attachments Dictionary attchs = new Dictionary(); -- cgit v1.1 From e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 30 Oct 2010 19:06:47 +0100 Subject: Fix logins and avatar appearance. Contains a Migration. May contain nuts. This will cause visual params to be persisted along with worn items. With this, alpha and tattoo laters will be saved. Multiple layers MAY work, but not tested because I don't use Viewer 2. --- OpenSim/Services/Interfaces/IAvatarService.cs | 105 +++++++++++++++++++------- 1 file changed, 77 insertions(+), 28 deletions(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 186871a..860a13b 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -149,33 +149,28 @@ namespace OpenSim.Services.Interfaces Data["Serial"] = appearance.Serial.ToString(); // Wearables Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); - Data["BodyItem"] = appearance.Wearables[AvatarWearable.BODY][0].ItemID.ToString(); - Data["EyesItem"] = appearance.Wearables[AvatarWearable.EYES][0].ItemID.ToString(); - Data["GlovesItem"] = appearance.Wearables[AvatarWearable.GLOVES][0].ItemID.ToString(); - Data["HairItem"] = appearance.Wearables[AvatarWearable.HAIR][0].ItemID.ToString(); - Data["JacketItem"] = appearance.Wearables[AvatarWearable.JACKET][0].ItemID.ToString(); - Data["PantsItem"] = appearance.Wearables[AvatarWearable.PANTS][0].ItemID.ToString(); - Data["ShirtItem"] = appearance.Wearables[AvatarWearable.SHIRT][0].ItemID.ToString(); - Data["ShoesItem"] = appearance.Wearables[AvatarWearable.SHOES][0].ItemID.ToString(); - Data["SkinItem"] = appearance.Wearables[AvatarWearable.SKIN][0].ItemID.ToString(); - Data["SkirtItem"] = appearance.Wearables[AvatarWearable.SKIRT][0].ItemID.ToString(); - Data["SocksItem"] = appearance.Wearables[AvatarWearable.SOCKS][0].ItemID.ToString(); - Data["UnderPantsItem"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].ItemID.ToString(); - Data["UnderShirtItem"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].ItemID.ToString(); - - Data["BodyAsset"] = appearance.Wearables[AvatarWearable.BODY][0].AssetID.ToString(); - Data["EyesAsset"] = appearance.Wearables[AvatarWearable.EYES][0].AssetID.ToString(); - Data["GlovesAsset"] = appearance.Wearables[AvatarWearable.GLOVES][0].AssetID.ToString(); - Data["HairAsset"] = appearance.Wearables[AvatarWearable.HAIR][0].AssetID.ToString(); - Data["JacketAsset"] = appearance.Wearables[AvatarWearable.JACKET][0].AssetID.ToString(); - Data["PantsAsset"] = appearance.Wearables[AvatarWearable.PANTS][0].AssetID.ToString(); - Data["ShirtAsset"] = appearance.Wearables[AvatarWearable.SHIRT][0].AssetID.ToString(); - Data["ShoesAsset"] = appearance.Wearables[AvatarWearable.SHOES][0].AssetID.ToString(); - Data["SkinAsset"] = appearance.Wearables[AvatarWearable.SKIN][0].AssetID.ToString(); - Data["SkirtAsset"] = appearance.Wearables[AvatarWearable.SKIRT][0].AssetID.ToString(); - Data["SocksAsset"] = appearance.Wearables[AvatarWearable.SOCKS][0].AssetID.ToString(); - Data["UnderPantsAsset"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].AssetID.ToString(); - Data["UnderShirtAsset"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].AssetID.ToString(); + + for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++) + { + for (int j = 0 ; j < appearance.Wearables[i].Count ; j++) + { + string fieldName = String.Format("Wearable {0}:{1}", i, j); + Data[fieldName] = String.Format("{0}:{1}", + appearance.Wearables[i][j].ItemID.ToString(), + appearance.Wearables[i][j].AssetID.ToString()); + } + } + + // Visual Params + string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; + byte[] binary = appearance.VisualParams; + + for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) + { + vps[i] = binary[i].ToString(); + } + + Data["VisualParams"] = String.Join(",", vps); // Attachments List attachments = appearance.GetAttachments(); @@ -188,12 +183,17 @@ namespace OpenSim.Services.Interfaces public AvatarAppearance ToAvatarAppearance(UUID owner) { AvatarAppearance appearance = new AvatarAppearance(owner); + + if (Data.Count == 0) + return appearance; + + appearance.ClearWearables(); try { if (Data.ContainsKey("Serial")) appearance.Serial = Int32.Parse(Data["Serial"]); - // Wearables + // Legacy Wearables if (Data.ContainsKey("BodyItem")) appearance.Wearables[AvatarWearable.BODY].Wear( UUID.Parse(Data["BodyItem"]), @@ -260,6 +260,35 @@ namespace OpenSim.Services.Interfaces UUID.Parse(Data["SkirtAsset"])); + if (Data.ContainsKey("VisualParams")) + { + string[] vps = Data["VisualParams"].Split(new char[] {','}); + byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; + + for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) + binary[i] = (byte)Convert.ToInt32(vps[i]); + + appearance.VisualParams = binary; + } + + // New style wearables + foreach (KeyValuePair _kvp in Data) + { + if (_kvp.Key.StartsWith("Wearable ")) + { + string wearIndex = _kvp.Key.Substring(9); + string[] wearIndices = wearIndex.Split(new char[] {':'}); + int index = Convert.ToInt32(wearIndices[0]); + + string[] ids = _kvp.Value.Split(new char[] {':'}); + UUID itemID = new UUID(ids[0]); + UUID assetID = new UUID(ids[1]); + + appearance.Wearables[index].Add(itemID, assetID); + } + } + + // Attachments Dictionary attchs = new Dictionary(); foreach (KeyValuePair _kvp in Data) @@ -278,6 +307,26 @@ namespace OpenSim.Services.Interfaces appearance.SetAttachment(point,uuid,UUID.Zero); } + + if (appearance.Wearables[AvatarWearable.BODY].Count == 0) + appearance.Wearables[AvatarWearable.BODY].Wear( + AvatarWearable.DefaultWearables[ + AvatarWearable.BODY][0]); + + if (appearance.Wearables[AvatarWearable.SKIN].Count == 0) + appearance.Wearables[AvatarWearable.SKIN].Wear( + AvatarWearable.DefaultWearables[ + AvatarWearable.SKIN][0]); + + if (appearance.Wearables[AvatarWearable.HAIR].Count == 0) + appearance.Wearables[AvatarWearable.HAIR].Wear( + AvatarWearable.DefaultWearables[ + AvatarWearable.HAIR][0]); + + if (appearance.Wearables[AvatarWearable.EYES].Count == 0) + appearance.Wearables[AvatarWearable.EYES].Wear( + AvatarWearable.DefaultWearables[ + AvatarWearable.EYES][0]); } catch { -- cgit v1.1 From 48f6d4774492053af4bf8fbe2aef74f64a727630 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 30 Oct 2010 12:30:03 -0700 Subject: Fixed: ToAvatarAppearance wasn't retrieving the AvatarHeight. --- OpenSim/Services/Interfaces/IAvatarService.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 860a13b..d7af562 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs @@ -193,6 +193,9 @@ namespace OpenSim.Services.Interfaces if (Data.ContainsKey("Serial")) appearance.Serial = Int32.Parse(Data["Serial"]); + if (Data.ContainsKey("AvatarHeight")) + appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); + // Legacy Wearables if (Data.ContainsKey("BodyItem")) appearance.Wearables[AvatarWearable.BODY].Wear( -- cgit v1.1 From 2bce1716afb4df36c4c67b2f17f6f0f18b341987 Mon Sep 17 00:00:00 2001 From: Marck Date: Mon, 1 Nov 2010 13:07:24 +0100 Subject: Fix HypergridLinker.Check4096() Make the optimization with IEnumerable.Except() in Check4096 actually work by providing an appropriate equality definition for GridRegion objects. --- OpenSim/Services/Interfaces/IGridService.cs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services/Interfaces') diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 77230a3..ee06225 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs @@ -97,7 +97,7 @@ namespace OpenSim.Services.Interfaces int GetRegionFlags(UUID scopeID, UUID regionID); } - public class GridRegion + public class GridRegion : Object { /// @@ -225,6 +225,33 @@ namespace OpenSim.Services.Interfaces EstateOwner = ConvertFrom.EstateOwner; } + # region Definition of equality + + /// + /// Define equality as two regions having the same, non-zero UUID. + /// + public bool Equals(GridRegion region) + { + if ((object)region == null) + return false; + // Return true if the non-zero UUIDs are equal: + return (RegionID != UUID.Zero) && RegionID.Equals(region.RegionID); + } + + public override bool Equals(Object obj) + { + if (obj == null) + return false; + return Equals(obj as GridRegion); + } + + public override int GetHashCode() + { + return RegionID.GetHashCode() ^ TerrainImage.GetHashCode(); + } + + #endregion + /// /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. /// -- cgit v1.1