mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- added TheShooter7's patch for NOPITCH flags for hitscan attacks.
SVN r2530 (trunk)
This commit is contained in:
parent
dab3ff000e
commit
d904d8276e
2 changed files with 6 additions and 2 deletions
|
@ -826,6 +826,7 @@ enum CBA_Flags
|
||||||
CBAF_AIMFACING = 1,
|
CBAF_AIMFACING = 1,
|
||||||
CBAF_NORANDOM = 2,
|
CBAF_NORANDOM = 2,
|
||||||
CBAF_EXPLICITANGLE = 4,
|
CBAF_EXPLICITANGLE = 4,
|
||||||
|
CBAF_NOPITCH = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
||||||
|
@ -852,7 +853,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
||||||
|
|
||||||
if (!pufftype) pufftype = PClass::FindClass(NAME_BulletPuff);
|
if (!pufftype) pufftype = PClass::FindClass(NAME_BulletPuff);
|
||||||
|
|
||||||
bslope = P_AimLineAttack (self, bangle, MISSILERANGE);
|
if (!(Flags & CBAF_NOPITCH)) bslope = P_AimLineAttack (self, bangle, MISSILERANGE);
|
||||||
|
|
||||||
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
|
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
|
||||||
for (i=0 ; i<NumBullets ; i++)
|
for (i=0 ; i<NumBullets ; i++)
|
||||||
|
@ -994,6 +995,7 @@ enum FB_Flags
|
||||||
FBF_USEAMMO = 1,
|
FBF_USEAMMO = 1,
|
||||||
FBF_NORANDOM = 2,
|
FBF_NORANDOM = 2,
|
||||||
FBF_EXPLICITANGLE = 4,
|
FBF_EXPLICITANGLE = 4,
|
||||||
|
FBF_NOPITCH = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
||||||
|
@ -1025,7 +1027,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
||||||
|
|
||||||
static_cast<APlayerPawn *>(self)->PlayAttacking2 ();
|
static_cast<APlayerPawn *>(self)->PlayAttacking2 ();
|
||||||
|
|
||||||
bslope = P_BulletSlope(self);
|
if (!(Flags & FBF_NOPITCH)) bslope = P_BulletSlope(self);
|
||||||
bangle = self->angle;
|
bangle = self->angle;
|
||||||
|
|
||||||
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
|
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
|
||||||
|
|
|
@ -17,11 +17,13 @@ const int CMF_CHECKTARGETDEAD = 8;
|
||||||
const int CBAF_AIMFACING = 1;
|
const int CBAF_AIMFACING = 1;
|
||||||
const int CBAF_NORANDOM = 2;
|
const int CBAF_NORANDOM = 2;
|
||||||
const int CBAF_EXPLICITANGLE = 4;
|
const int CBAF_EXPLICITANGLE = 4;
|
||||||
|
const int CBAF_NOPITCH = 8;
|
||||||
|
|
||||||
// Flags for A_FireBullets
|
// Flags for A_FireBullets
|
||||||
const int FBF_USEAMMO = 1;
|
const int FBF_USEAMMO = 1;
|
||||||
const int FBF_NORANDOM = 2;
|
const int FBF_NORANDOM = 2;
|
||||||
const int FBF_EXPLICITANGLE = 4;
|
const int FBF_EXPLICITANGLE = 4;
|
||||||
|
const int FBF_NOPITCH = 8;
|
||||||
|
|
||||||
// Flags for A_SpawnItemEx
|
// Flags for A_SpawnItemEx
|
||||||
const int SXF_TRANSFERTRANSLATION=1;
|
const int SXF_TRANSFERTRANSLATION=1;
|
||||||
|
|
Loading…
Reference in a new issue