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/Framework/AvatarAppearance.cs | 9 +++++++-- OpenSim/Framework/AvatarWearable.cs | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index ee60622..1e003f7 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -111,6 +111,10 @@ namespace OpenSim.Framework SetDefaultParams(); SetHeight(); + m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; + for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ ) + m_wearables[i] = new AvatarWearable(); + m_attachments = new Dictionary>(); } @@ -172,10 +176,11 @@ namespace OpenSim.Framework m_serial = appearance.Serial; m_owner = appearance.Owner; - m_wearables = null; + m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; + for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ ) + m_wearables[i] = new AvatarWearable(); if (appearance.Wearables != null) { - m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; //should be 15 of these for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) SetWearable(i,appearance.Wearables[i]); } diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index 631971f..0a02dcf 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs @@ -63,7 +63,7 @@ namespace OpenSim.Framework public static readonly int UNDERPANTS = 11; public static readonly int SKIRT = 12; public static readonly int ALPHA = 13; - public static readonly int TATTOO = 15; + public static readonly int TATTOO = 14; public static readonly int MAX_WEARABLES = 15; -- cgit v1.1