- Added DavidPH's FBF_EXPLICITANGLE extension.

SVN r2323 (trunk)
This commit is contained in:
Randy Heit 2010-05-14 02:18:27 +00:00
parent 489c3df007
commit 2d4502018a
2 changed files with 16 additions and 2 deletions

View File

@ -962,6 +962,7 @@ enum FB_Flags
{ {
FBF_USEAMMO = 1, FBF_USEAMMO = 1,
FBF_NORANDOM = 2, FBF_NORANDOM = 2,
FBF_EXPLICITANGLE = 4,
}; };
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
@ -1014,8 +1015,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
if (NumberOfBullets == -1) NumberOfBullets = 1; if (NumberOfBullets == -1) NumberOfBullets = 1;
for (i=0 ; i<NumberOfBullets ; i++) for (i=0 ; i<NumberOfBullets ; i++)
{ {
int angle = bangle + pr_cwbullet.Random2() * (Spread_XY / 255); int angle = bangle;
int slope = bslope + pr_cwbullet.Random2() * (Spread_Z / 255); int slope = bslope;
if (Flags & FBF_EXPLICITANGLE)
{
angle += Spread_XY;
slope += Spread_Z;
}
else
{
angle += pr_cwbullet.Random2() * (Spread_XY / 255);
slope += pr_cwbullet.Random2() * (Spread_Z / 255);
}
int damage = DamagePerBullet; int damage = DamagePerBullet;
if (!(Flags & FBF_NORANDOM)) if (!(Flags & FBF_NORANDOM))

View File

@ -12,6 +12,7 @@ const int CBAF_NORANDOM = 2;
// 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;
// Flags for A_SpawnItemEx // Flags for A_SpawnItemEx
const int SXF_TRANSFERTRANSLATION=1; const int SXF_TRANSFERTRANSLATION=1;