Last weapon: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
m .
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This is set to the currently selected weapon when the player attempts to switch to a new weapon. If the weapon change was successful, this is reset to -1.  This is used so that the game can determine which weapon to switch back to in the event that the player attempts to switch to a weapon that is out of ammo. See [[curr_weapon]] and [[wantweaponfire]].
'''last_weapon''' is set to the currently selected weapon when the player attempts to switch to another weapon. While the ID of the weapon is changed the instant the weapon starts to change, the tile that is drawn on screen is only set after weapon_pos reaches -9, and during that moment last_weapon is used to store the tile of the last weapon.
 
See [[WEAPON]] for the list of weapon IDs.


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

Latest revision as of 20:22, 20 July 2012

last_weapon is set to the currently selected weapon when the player attempts to switch to another weapon. While the ID of the weapon is changed the instant the weapon starts to change, the tile that is drawn on screen is only set after weapon_pos reaches -9, and during that moment last_weapon is used to store the tile of the last weapon.

See WEAPON for the list of weapon IDs.