mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-30 16:01:49 +00:00
- add melee range support to A_Saw and A_Punch.
This is merely for MBF21 support and not a recommended editing feature! There are better ways to define the range of a player's attack!
This commit is contained in:
parent
a9ad3d1fc3
commit
b043a5a5de
3 changed files with 3 additions and 4 deletions
|
@ -61,7 +61,6 @@ struct FLinePortal;
|
||||||
#define USERANGE (64.)
|
#define USERANGE (64.)
|
||||||
|
|
||||||
#define DEFMELEERANGE (64.)
|
#define DEFMELEERANGE (64.)
|
||||||
#define SAWRANGE (64.+(1./65536.)) // use meleerange + 1 so the puff doesn't skip the flash (i.e. plays all states)
|
|
||||||
#define MISSILERANGE (32*64.)
|
#define MISSILERANGE (32*64.)
|
||||||
#define PLAYERMISSILERANGE (8192.) // [RH] New MISSILERANGE for players
|
#define PLAYERMISSILERANGE (8192.) // [RH] New MISSILERANGE for players
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ extend class StateProvider
|
||||||
}
|
}
|
||||||
if (range == 0)
|
if (range == 0)
|
||||||
{
|
{
|
||||||
range = SAWRANGE;
|
range = MeleeRange + (1. / 65536.); // MBF21 SAWRANGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
double ang = angle + spread_xy * (Random2[Saw]() / 255.);
|
double ang = angle + spread_xy * (Random2[Saw]() / 255.);
|
||||||
|
|
|
@ -65,9 +65,9 @@ extend class Actor
|
||||||
damage *= 10;
|
damage *= 10;
|
||||||
|
|
||||||
double ang = angle + Random2[Punch]() * (5.625 / 256);
|
double ang = angle + Random2[Punch]() * (5.625 / 256);
|
||||||
double pitch = AimLineAttack (ang, DEFMELEERANGE, null, 0., ALF_CHECK3D);
|
double pitch = AimLineAttack (ang, MeleeRange, null, 0., ALF_CHECK3D);
|
||||||
|
|
||||||
LineAttack (ang, DEFMELEERANGE, pitch, damage, 'Melee', "BulletPuff", LAF_ISMELEEATTACK, t);
|
LineAttack (ang, MeleeRange, pitch, damage, 'Melee', "BulletPuff", LAF_ISMELEEATTACK, t);
|
||||||
|
|
||||||
// turn to face target
|
// turn to face target
|
||||||
if (t.linetarget)
|
if (t.linetarget)
|
||||||
|
|
Loading…
Reference in a new issue