mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-29 08:04:21 -04:00
fix crash when attack sound is missing
This commit is contained in:
parent
f8aaa2bfab
commit
37a15253dd
@ -1852,7 +1852,11 @@ void A_SkullAttack(mobj_t *actor)
|
||||
dest = actor->target;
|
||||
actor->flags |= MF_SKULLFLY;
|
||||
|
||||
// [FG] fix crash when attack sound is missing
|
||||
if (actor->info->attacksound)
|
||||
{
|
||||
S_StartSound(actor, actor->info->attacksound);
|
||||
}
|
||||
A_FaceTarget(actor);
|
||||
an = actor->angle >> ANGLETOFINESHIFT;
|
||||
actor->momx = FixedMul(SKULLSPEED, finecosine[an]);
|
||||
@ -1877,7 +1881,11 @@ void A_BetaSkullAttack(mobj_t *actor)
|
||||
int damage;
|
||||
if (!actor->target || actor->target->type == MT_SKULL)
|
||||
return;
|
||||
// [FG] fix crash when attack sound is missing
|
||||
if (actor->info->attacksound)
|
||||
{
|
||||
S_StartSound(actor, actor->info->attacksound);
|
||||
}
|
||||
A_FaceTarget(actor);
|
||||
damage = (P_Random(pr_skullfly)%8+1)*actor->info->damage;
|
||||
P_DamageMobj(actor->target, actor, actor, damage);
|
||||
|
Loading…
x
Reference in New Issue
Block a user