Merge pull request #125 from WildCard65/wearablesfix

Actually remove extra wearables.
This commit is contained in:
Asher Baker
2014-08-05 15:02:14 +01:00
+3 -3
View File
@@ -435,9 +435,6 @@ stock TF2_RemoveWeaponSlot(client, slot)
new weaponIndex; new weaponIndex;
while ((weaponIndex = GetPlayerWeaponSlot(client, slot)) != -1) while ((weaponIndex = GetPlayerWeaponSlot(client, slot)) != -1)
{ {
RemovePlayerItem(client, weaponIndex);
AcceptEntityInput(weaponIndex, "Kill");
// bug #6206 // bug #6206
// papering over a valve bug where a weapon's extra wearables aren't properly removed from the weapon's owner // 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"); new extraWearable = GetEntPropEnt(weaponIndex, Prop_Send, "m_hExtraWearable");
@@ -451,6 +448,9 @@ stock TF2_RemoveWeaponSlot(client, slot)
{ {
TF2_RemoveWearable(client, extraWearable); TF2_RemoveWearable(client, extraWearable);
} }
RemovePlayerItem(client, weaponIndex);
AcceptEntityInput(weaponIndex, "Kill");
} }
} }