A_FireShotgun

From ZDoom Wiki
Jump to navigation Jump to search

A_FireShotgun

DoomWiki.org
For more information on this article, visit the A_FireShotgun page on the Doom Wiki.


(no parameters)


Performs Doom's shotgun attack, firing seven pellets each dealing 5 * 1d3 damage. This is a shortcut for calling A_FireBullets, A_PlaySound and A_GunFlash with predetermined hard-coded parameters.

This code is the equivalent of calling A_FireShotgun for 7 tics on the A frame of the SHTG sprite:

    SHTG A 0 A_FireBullets (5.6, 0, 7, 5, "BulletPuff")
    SHTG A 0 A_PlaySound ("weapons/shotgf", CHAN_WEAPON)
    SHTG A 7 A_GunFlash

If vertical bullet spread for weapons is enabled, the function applies vertical spread in addition to the horizontal one.