Show empty weapon: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
Jwaffe (talk | contribs)
Pretty much rewrote the page, the old content didn't match the source as it is now.
 
Line 1: Line 1:
show_empty_weapon is a count-down timer.<BR>
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.<BR>
It is initialized to zero.<BR>
 
It is set to 32 when a new weapon is picked up.<BR>
It is initialized to zero, and set to 32 on every weapon switch.<BR>
When show_empty_weapon reaches zero from non-zero, the subweapon flag is set if the [[last_full_weapon]] was GROW_WEAPON.<BR>
 
More will have to be done here to allow any weapon type to have sub-weapons...
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)<BR>


[[Category:Player structure members]]
[[Category:Player structure members]]

Latest revision as of 16:35, 21 September 2017

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)