From DoomWiki.org

A_ReFire is used to implement the "cool down" animation when the player stops firing the plasma gun.

A_ReFire is a code pointer used in the attack animation for all weapons.

A_ReFire checks if the player currently has the fire button held down and if so, begins the weapon firing sequence again. It is called at the end of the firing sequence for most weapons, but most notably the plasma gun to implement its "cool down" animation: if the player is still holding the fire button, the firing sequence restarts to fire another plasma ball, but once the fire button is released the animation passes through to the cooldown frame, giving a short delay before the player can fire again. While it is less visible to the player, a similar 20 tic pause exists for the BFG9000 that is not present if the fire button is held down.

Every time that A_ReFire restarts the firing sequence, an internal counter is incremented; the counter is reset to zero when fire is no longer held. The counter is then used by A_FirePistol and A_FireCGun to give higher accuracy on the first shot of the pistol and chaingun.


The A_ReFire code pointer appears in the following states in Doom's state table:


The following is an example of how to set the A_ReFire code pointer in a DeHackEd file:

Pointer 21 (Frame 34)
Codep Frame = 87

Or using BEX syntax:

Frame 1234 = ReFire

External links[edit]