A ReFire

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

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 rifle 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 BFG that is not present if the fire button is held down.

Every time that  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.

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

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

Pointer 21 (Frame 34) Codep Frame = 87

Or using BEX syntax:

[CODEPTR] Frame 1234 = ReFire