mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
- Added DavidPH's FBF_EXPLICITANGLE extension.
SVN r2323 (trunk)
This commit is contained in:
parent
489c3df007
commit
2d4502018a
2 changed files with 16 additions and 2 deletions
|
@ -962,6 +962,7 @@ enum FB_Flags
|
|||
{
|
||||
FBF_USEAMMO = 1,
|
||||
FBF_NORANDOM = 2,
|
||||
FBF_EXPLICITANGLE = 4,
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
||||
|
@ -1014,8 +1015,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
|||
if (NumberOfBullets == -1) NumberOfBullets = 1;
|
||||
for (i=0 ; i<NumberOfBullets ; i++)
|
||||
{
|
||||
int angle = bangle + pr_cwbullet.Random2() * (Spread_XY / 255);
|
||||
int slope = bslope + pr_cwbullet.Random2() * (Spread_Z / 255);
|
||||
int angle = bangle;
|
||||
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;
|
||||
|
||||
if (!(Flags & FBF_NORANDOM))
|
||||
|
|
|
@ -12,6 +12,7 @@ const int CBAF_NORANDOM = 2;
|
|||
// Flags for A_FireBullets
|
||||
const int FBF_USEAMMO = 1;
|
||||
const int FBF_NORANDOM = 2;
|
||||
const int FBF_EXPLICITANGLE = 4;
|
||||
|
||||
// Flags for A_SpawnItemEx
|
||||
const int SXF_TRANSFERTRANSLATION=1;
|
||||
|
|
Loading…
Reference in a new issue