mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- fixed: A_CustomBulletAttack may not rely on the parameter default setter to get a valid puff. This must be checked explicitly in the functions body to ensure it is never NULL.
This commit is contained in:
parent
b926cf35d5
commit
d43ea33031
1 changed files with 2 additions and 1 deletions
|
@ -1463,7 +1463,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
|||
PARAM_ANGLE (spread_z);
|
||||
PARAM_INT (numbullets);
|
||||
PARAM_INT (damageperbullet);
|
||||
PARAM_CLASS_OPT (pufftype, AActor) { pufftype = PClass::FindActor(NAME_BulletPuff); }
|
||||
PARAM_CLASS_OPT (pufftype, AActor) { pufftype = nullptr; }
|
||||
PARAM_FLOAT_OPT (range) { range = 0; }
|
||||
PARAM_INT_OPT (flags) { flags = 0; }
|
||||
PARAM_INT_OPT (ptr) { ptr = AAPTR_TARGET; }
|
||||
|
@ -1487,6 +1487,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomBulletAttack)
|
|||
bangle = self->Angles.Yaw;
|
||||
|
||||
if (!(flags & CBAF_NOPITCH)) bslope = P_AimLineAttack (self, bangle, MISSILERANGE);
|
||||
if (pufftype == nullptr) pufftype = PClass::FindActor(NAME_BulletPuff);
|
||||
|
||||
S_Sound (self, CHAN_WEAPON, self->AttackSound, 1, ATTN_NORM);
|
||||
for (i = 0; i < numbullets; i++)
|
||||
|
|
Loading…
Reference in a new issue