From d904d8276e0541b817001db5e0ddb52ff4b6f2ad Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 13 Aug 2010 06:22:49 +0000 Subject: [PATCH] - added TheShooter7's patch for NOPITCH flags for hitscan attacks. SVN r2530 (trunk) --- src/thingdef/thingdef_codeptr.cpp | 6 ++++-- wadsrc/static/actors/constants.txt | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 4330c204c..aacb45b18 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -826,6 +826,7 @@ enum CBA_Flags CBAF_AIMFACING = 1, CBAF_NORANDOM = 2, CBAF_EXPLICITANGLE = 4, + CBAF_NOPITCH = 8, }; 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); - 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); for (i=0 ; i(self)->PlayAttacking2 (); - bslope = P_BulletSlope(self); + if (!(Flags & FBF_NOPITCH)) bslope = P_BulletSlope(self); bangle = self->angle; if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff); diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index cbd91add6..05e77df2a 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -17,11 +17,13 @@ const int CMF_CHECKTARGETDEAD = 8; const int CBAF_AIMFACING = 1; const int CBAF_NORANDOM = 2; const int CBAF_EXPLICITANGLE = 4; +const int CBAF_NOPITCH = 8; // Flags for A_FireBullets const int FBF_USEAMMO = 1; const int FBF_NORANDOM = 2; const int FBF_EXPLICITANGLE = 4; +const int FBF_NOPITCH = 8; // Flags for A_SpawnItemEx const int SXF_TRANSFERTRANSLATION=1;