Show empty weapon

From EDukeWiki
Revision as of 16:35, 21 September 2017 by Jwaffe (talk | contribs) (Pretty much rewrote the page, the old content didn't match the source as it is now.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)