- added DavidÜH's explicit angle submission for A_CustomBulletAttack function.
SVN r2452 (trunk)
This commit is contained in:
parent
bc47f7133b
commit
58be666c9c
2 changed files with 16 additions and 2 deletions
|
|
@ -825,6 +825,7 @@ enum CBA_Flags
|
|||
{
|
||||
CBAF_AIMFACING = 1,
|
||||
CBAF_NORANDOM = 2,
|
||||
CBAF_EXPLICITANGLE = 4,
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
||||
|
|
@ -856,8 +857,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
|||
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
|
||||
for (i=0 ; i<NumBullets ; i++)
|
||||
{
|
||||
int angle = bangle + pr_cabullet.Random2() * (Spread_XY / 255);
|
||||
int slope = bslope + pr_cabullet.Random2() * (Spread_Z / 255);
|
||||
int angle = bangle;
|
||||
int slope = bslope;
|
||||
|
||||
if (Flags & CBAF_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 & CBAF_NORANDOM))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue