mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-31 01:10:52 +00:00
* Updated to ZDoom 4290:
- Fixed more possible NULL derefs from r4264. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1577 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
87761b3383
commit
9c233b2d98
2 changed files with 6 additions and 6 deletions
|
@ -3646,7 +3646,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||||
hitz = shootz + FixedMul (vz, dist);
|
hitz = shootz + FixedMul (vz, dist);
|
||||||
|
|
||||||
// Spawn bullet puffs or blood spots, depending on target type.
|
// 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->flags & MF_NOBLOOD) ||
|
||||||
(trace.Actor->flags2 & (MF2_INVULNERABLE|MF2_DORMANT)))
|
(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.
|
// 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);
|
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!
|
// [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.
|
// Note: The puff may not yet be spawned here so we must check the class defaults, not the actor.
|
||||||
int newdam = damage;
|
int newdam = damage;
|
||||||
if (damage || (puffDefaults->flags6 & MF6_FORCEPAIN))
|
if (damage || (puffDefaults != NULL && puffDefaults->flags6 & MF6_FORCEPAIN))
|
||||||
{
|
{
|
||||||
int dmgflags = DMG_INFLICTOR_IS_PUFF | pflag;
|
int dmgflags = DMG_INFLICTOR_IS_PUFF | pflag;
|
||||||
// Allow MF5_PIERCEARMOR on a weapon as well.
|
// 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);
|
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 &&
|
if (!bloodsplatter && !axeBlood &&
|
||||||
!(trace.Actor->flags & MF_NOBLOOD) &&
|
!(trace.Actor->flags & MF_NOBLOOD) &&
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
// This file was automatically generated by the
|
// This file was automatically generated by the
|
||||||
// updaterevision tool. Do not edit by hand.
|
// updaterevision tool. Do not edit by hand.
|
||||||
|
|
||||||
#define ZD_SVN_REVISION_STRING "4289"
|
#define ZD_SVN_REVISION_STRING "4290"
|
||||||
#define ZD_SVN_REVISION_NUMBER 4289
|
#define ZD_SVN_REVISION_NUMBER 4290
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue