aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/AvatarFactory
diff options
context:
space:
mode:
authorMelanie2010-10-30 19:06:47 +0100
committerMelanie2010-10-30 19:06:47 +0100
commite98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d (patch)
treedcacdefcbe357eadad64d81c48b3bcf3f5efca5e /OpenSim/Region/CoreModules/Avatar/AvatarFactory
parent* AbsolutePosition.Get{} returns incorrect result for child prim so switch to... (diff)
downloadopensim-SC_OLD-e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d.zip
opensim-SC_OLD-e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d.tar.gz
opensim-SC_OLD-e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d.tar.bz2
opensim-SC_OLD-e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/AvatarFactory')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs15
1 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 6cbd8bd..7f482cb 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -356,17 +356,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
356 356
357// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId); 357// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId);
358 358
359 AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance); 359 AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false);
360 360
361 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) 361 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
362 { 362 {
363 if (wear.Type < AvatarWearable.MAX_WEARABLES) 363 if (wear.Type < AvatarWearable.MAX_WEARABLES)
364 { 364 avatAppearance.Wearables[wear.Type].Add(wear.ItemID,UUID.Zero);
365 AvatarWearable newWearable = new AvatarWearable(wear.ItemID,UUID.Zero);
366 avatAppearance.SetWearable(wear.Type, newWearable);
367 }
368 } 365 }
369 366
367 avatAppearance.GetAssetsFrom(sp.Appearance);
368
370 // This could take awhile since it needs to pull inventory 369 // This could take awhile since it needs to pull inventory
371 SetAppearanceAssets(sp.UUID, ref avatAppearance); 370 SetAppearanceAssets(sp.UUID, ref avatAppearance);
372 371
@@ -384,6 +383,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
384 { 383 {
385 for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) 384 for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ )
386 { 385 {
386 if (appearance.Wearables[i][j].ItemID == UUID.Zero)
387 continue;
388
389 // Ignore ruth's assets
390 if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID)
391 continue;
387 InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); 392 InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID);
388 baseItem = invService.GetItem(baseItem); 393 baseItem = invService.GetItem(baseItem);
389 394