Merge pull request #121 from VoiDeD/bug-6206
Remove the extra wearables of weapons in TF2_RemoveWeaponSlot (r=psychonic).
This commit is contained in:
commit
836cde4e21
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user