A_CheckReload


This function checks whether the player still has enough ammunition for another attack with the current weapon. If not, it starts a weapon change.

A_CheckReload

(no parameters)

Examples

This code is taken from Doom 2's SuperShotgun. A_CheckReload is called to check to see if there are any more shells left before starting the "reload" animation of the super shotgun.

  Fire:
    SHT2 A 3
    SHT2 A 7 A_FireShotgun2
    SHT2 B 7
    SHT2 C 7 A_CheckReload
    SHT2 D 7 A_OpenShotgun2
    SHT2 E 7
    SHT2 F 7 A_LoadShotgun2
    SHT2 G 6
    SHT2 H 6 A_CloseShotgun2
    SHT2 A 5 A_ReFire
    Goto Ready

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.