Show empty weapon

From EDukeWiki
Jump to navigation Jump to search

show_empty_weapon is a count-down timer. It is a timer used to show an empty weapon briefly before switching back to the last_full_weapon if weaponswitch is set to 2.

It is initialized to zero, and set to 32 on every weapon switch.

When show_empty_weapon reaches zero from non-zero, and the weapon being switched to has no ammo, the player's weapon is set back to last_full_weapon (including setting subweapon for GROW_WEAPON / SHRINKER_WEAPON)