A_FireMissile
From DoomWiki.org
A_FireMissile is a code pointer used in the attack animation for the rocket launcher.
A_FireMissile
spawns a rocket (object of type MT_ROCKET
) moving in the direction that the player is currently facing. Autoaim is applied to determine the vertical angle to aim at. The rocket is spawned in the exact same X/Y location as the player; it passes out of the player since rockets pass through the player that fired them.
Uses[edit]
The A_FireMissile
code pointer appears in the following states in Doom's state table:
Frame number | Doom internal name | Use |
---|---|---|
61 | S_MISSILE2 | attack animation for the rocket launcher |
Example[edit]
The following is an example of how to set the A_FireMissile
code pointer in a DeHackEd file:
Pointer 21 (Frame 34) Codep Frame = 61
Or using BEX syntax:
[CODEPTR] Frame 1234 = FireMissile
Code structure[edit]
The following call graph shows some of the underlying internals of the A_FireMissile
function. The P_AimLineAttack
function provides some autoaim adjustment before the rocket is spawned. If the rocket cannot be spawned, it detonates immediately.
See also[edit]
- A_CyberAttack - monster equivalent code pointer used by the cyberdemon to fire its rockets.
External links[edit]
- A_FireMissile in the Doom source code.
- A_FireMissile at the ZDoom wiki
- FireMissile at the Eternity Engine wiki