A_FPunchAttack

From ZDoom Wiki
Jump to: navigation, search

A_FPunchAttack
(no parameter)

Search for a possible target in a 90° cone in front of the calling player, starting right ahead and scanning rightwards up to 45°, then going back center and scanning leftwards up to -45°. The range for this attack is of 128 units, twice the default range for most melee attacks. If a target is found, the special1 counter is increased by one. The exact effects of the attack depend on the value of that counter.

  • A value of less than three: the victim is dealt between 40 and 55 points of damage, is pushed back with a strength of two, and a PunchPuff is used by the attack.
  • A value of three: the victim is dealt between 80 and 110 points of damage, is pushed back with a strength of six, and a HammerPuff is used by the attack. The counter is reset to 0, the weapon goes to its "Fire2" state, and the player plays the sound "*fistgrunt on the VOICE channel.

If the attack does not strike a creature or other attackable object, the counter is also reset to 0. A PunchPuff is spawned if it strikes a wall within 64 units (half the attack range of this function).

This codepointer is restricted to FWeapFist and derived classes.

Personal tools
Namespaces

Variants
Actions
Navigation
ACS
DECORATE
ZDoom mods
Toolbox