This commit fixes all the appearance related null refs. Still can't log in,

client displays a blank error box.
This commit is contained in:
Melanie
2010-10-30 02:25:25 +01:00
parent 46362cd1c0
commit ff7da2082d
4 changed files with 69 additions and 48 deletions

View File

@@ -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<int, List<AvatarAttachment>>();
}
@@ -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]);
}

View File

@@ -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;