diff --git a/SecondBotEvents/Services/CurrentOutfitFolder.cs b/SecondBotEvents/Services/CurrentOutfitFolder.cs index d18d1e9..89d1630 100644 --- a/SecondBotEvents/Services/CurrentOutfitFolder.cs +++ b/SecondBotEvents/Services/CurrentOutfitFolder.cs @@ -1,4 +1,4 @@ -using OpenMetaverse; +using OpenMetaverse; using SecondBotEvents.Config; using System; using System.Collections.Generic; @@ -522,6 +522,13 @@ namespace SecondBotEvents.Services AddLink(item); } + // Detach all current non-body-part items first to avoid toggling + var currentWorn = ContentLinks().Select(RealInventoryItem).Where(i => !IsBodyPart(i)).ToList(); + if (currentWorn.Count > 0) + { + GetClient().Appearance.RemoveFromOutfit(currentWorn); + } + GetClient().Appearance.ReplaceOutfit(outfit, false); ThreadPool.QueueUserWorkItem(sync => {