mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
- Fixed more possible NULL derefs from r4264
SVN r4290 (trunk)
This commit is contained in:
parent
b493d8e823
commit
f436c02a43
1 changed files with 4 additions and 4 deletions
|
@ -3646,7 +3646,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
hitz = shootz + FixedMul (vz, dist);
|
||||
|
||||
// Spawn bullet puffs or blood spots, depending on target type.
|
||||
if ((puffDefaults->flags3 & MF3_PUFFONACTORS) ||
|
||||
if ((puffDefaults != NULL && puffDefaults->flags3 & MF3_PUFFONACTORS) ||
|
||||
(trace.Actor->flags & MF_NOBLOOD) ||
|
||||
(trace.Actor->flags2 & (MF2_INVULNERABLE|MF2_DORMANT)))
|
||||
{
|
||||
|
@ -3658,7 +3658,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
}
|
||||
|
||||
// Allow puffs to inflict poison damage, so that hitscans can poison, too.
|
||||
if (puffDefaults->PoisonDamage > 0 && puffDefaults->PoisonDuration != INT_MIN)
|
||||
if (puffDefaults != NULL && puffDefaults->PoisonDamage > 0 && puffDefaults->PoisonDuration != INT_MIN)
|
||||
{
|
||||
P_PoisonMobj(trace.Actor, puff ? puff : t1, t1, puffDefaults->PoisonDamage, puffDefaults->PoisonDuration, puffDefaults->PoisonPeriod, puffDefaults->PoisonDamageType);
|
||||
}
|
||||
|
@ -3666,7 +3666,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
// [GZ] If MF6_FORCEPAIN is set, we need to call P_DamageMobj even if damage is 0!
|
||||
// Note: The puff may not yet be spawned here so we must check the class defaults, not the actor.
|
||||
int newdam = damage;
|
||||
if (damage || (puffDefaults->flags6 & MF6_FORCEPAIN))
|
||||
if (damage || (puffDefaults != NULL && puffDefaults->flags6 & MF6_FORCEPAIN))
|
||||
{
|
||||
int dmgflags = DMG_INFLICTOR_IS_PUFF | pflag;
|
||||
// Allow MF5_PIERCEARMOR on a weapon as well.
|
||||
|
@ -3685,7 +3685,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
|||
}
|
||||
newdam = P_DamageMobj (trace.Actor, puff ? puff : t1, t1, damage, damageType, dmgflags);
|
||||
}
|
||||
if (!(puffDefaults->flags3&MF3_BLOODLESSIMPACT))
|
||||
if (!(puffDefaults != NULL && puffDefaults->flags3&MF3_BLOODLESSIMPACT))
|
||||
{
|
||||
if (!bloodsplatter && !axeBlood &&
|
||||
!(trace.Actor->flags & MF_NOBLOOD) &&
|
||||
|
|
Loading…
Reference in a new issue