A_Saw
From DoomWiki.org
This article or section is a stub. Please help the Doom Wiki by adding to it. |
A_Saw is a code pointer used in the attack animation for the chainsaw.
Contents
Uses[edit]
The A_Saw
code pointer appears in the following states in Doom's state table:
Frame number | Doom internal name | Use |
---|---|---|
71 | S_SAW1 | attack animation for the chainsaw |
72 | S_SAW2 | attack animation for the chainsaw |
Example[edit]
The following is an example of how to set the A_Saw
code pointer in a DeHackEd file:
Pointer 21 (Frame 34) Codep Frame = 72
Or using BEX syntax:
[CODEPTR] Frame 1234 = Saw
Code structure[edit]
A_Saw
uses largely the same underlying functions as A_FirePistol and other tracer attack functions. P_AimLineAttack
is used to aim in the direction of a monster in front of the player and P_LineAttack
performs the attack. Unlike with ranged weapons, the functions are called with a very limited range. These two functions use the standard path traversal functions (P_PathTraverse
) to identify targets in the direction the player is facing.