mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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.
This commit is contained in:
@@ -5734,6 +5734,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||
AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
|
||||
for (int i = 0; i < nowWearing.WearableData.Length; i++)
|
||||
{
|
||||
m_log.DebugFormat("[XXX]: Wearable type {0} item {1}", nowWearing.WearableData[i].WearableType, nowWearing.WearableData[i].ItemID);
|
||||
AvatarWearingArgs.Wearable wearable =
|
||||
new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID,
|
||||
nowWearing.WearableData[i].WearableType);
|
||||
|
||||
@@ -356,17 +356,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||
|
||||
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId);
|
||||
|
||||
AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance);
|
||||
AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false);
|
||||
|
||||
foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
|
||||
{
|
||||
if (wear.Type < AvatarWearable.MAX_WEARABLES)
|
||||
{
|
||||
AvatarWearable newWearable = new AvatarWearable(wear.ItemID,UUID.Zero);
|
||||
avatAppearance.SetWearable(wear.Type, newWearable);
|
||||
}
|
||||
avatAppearance.Wearables[wear.Type].Add(wear.ItemID,UUID.Zero);
|
||||
}
|
||||
|
||||
avatAppearance.GetAssetsFrom(sp.Appearance);
|
||||
|
||||
// This could take awhile since it needs to pull inventory
|
||||
SetAppearanceAssets(sp.UUID, ref avatAppearance);
|
||||
|
||||
@@ -384,6 +383,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||
{
|
||||
for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ )
|
||||
{
|
||||
if (appearance.Wearables[i][j].ItemID == UUID.Zero)
|
||||
continue;
|
||||
|
||||
// Ignore ruth's assets
|
||||
if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID)
|
||||
continue;
|
||||
InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID);
|
||||
baseItem = invService.GetItem(baseItem);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user