diff --git a/plugins/include/tf2_stocks.inc b/plugins/include/tf2_stocks.inc index f1bbf295..72d3dbca 100644 --- a/plugins/include/tf2_stocks.inc +++ b/plugins/include/tf2_stocks.inc @@ -437,6 +437,20 @@ stock TF2_RemoveWeaponSlot(client, slot) { RemovePlayerItem(client, weaponIndex); AcceptEntityInput(weaponIndex, "Kill"); + + // bug #6206 + // papering over a valve bug where a weapon's extra wearables aren't properly removed from the weapon's owner + new extraWearable = GetEntPropEnt(weaponIndex, Prop_Send, "m_hExtraWearable"); + if (extraWearable != -1) + { + TF2_RemoveWearable(client, extraWearable); + } + + extraWearable = GetEntPropEnt(weaponIndex, Prop_Send, "m_hExtraWearableViewModel"); + if (extraWearable != -1) + { + TF2_RemoveWearable(client, extraWearable); + } } }