Implements a more customizable hitscan attack for monsters;
the parameters are passed as Args1..Args8:
1. horz_spread: The horizontal spread, in degrees.
2. vert_spread: The vertical spread, in degrees.
3. numbullets: The number of bullets to fire.
4. damageperbullet: The amount of damage each bullet does. Unless the CBAF_NORANDOM flag is set, this is multiplied by a random value between 1 and 3.
5. pufftype: Thing mnemonic or DeHackEd number to spawn for puffs (when a wall is hit). Defaults to "BulletPuff" if missing or invalid.
6. range: The maximum range of the bullets. Default is 0, which is interpreted as 2048.
7. flags: bitmask consisting of any number of the following options (bits):
* CBAF_AIMFACING (1): If set, the attack will be fired in the direction the actor is currently facing, rather than at the actor's current target.
* CBAF_NORANDOM (2): If set, the damage per bullet is not randomized.
* CBAF_EXPLICITANGLE> (4): If set, the horizontal and vertical spread are used as explicitly stated, instead of being used as a range for random spread.
* CBAF_NOPITCH> (8): If set, the vertical angle is not adjusted to aim at the target.
* CBAF_USEAMMO (16): If set, the player's bullet inventory is checked/depleted. Valid only for players/weapons.
8. firing sound
|
|