halflife
halflife copied to clipboard
[Opposing Force] Pipe wrench big swing attack isn't cancelled when the wrench is unequipped
When you start a big swing attack (secondary attack) and then unequip the weapon by either switching weapons or dropping it, when you equip the weapon again the attack will continue.
This can happen even if another player picks up the wrench.
To fix this modify CPipewrench::Holster by adding this to the start of the function:
//Cancel any swing in progress.
m_iSwingMode = 0;
SetThink(nullptr);