You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Native TF2Util_CanWeaponAttack, which takes a weapon entity and confirms that it has an owner that is able to attack. Useful in weapon attack hooks, as those may still be called when the player is stunned or using attack bindings on taunts that trigger special animations.
This does not check for ammo or attack times in the future; you still need to check those properties yourself.
Native TF2Util_SetPlayerActiveWeapon, which, as the name describes, attempts to switch the player's active weapon to the one specified. The game verifies that the player can switch to the weapon and that the current one can be holstered, so plugins that hook on those operations will work as intended.