commit 1b06590a72efd79fce90d91adfa0694e31a7c3e5
Author: mfrancis95 <mikefrancis95@gmail.com>
AuthorDate: Mon Dec 9 00:22:24 2019 -0500
Commit: mfrancis95 <mikefrancis95@gmail.com>
CommitDate: Thu Dec 12 07:56:26 2019 -0500
Remove unnecessary non-null player checks in Hexen's P_PoisonDamage. These checks are safe to remove because player will always be non-null within that function
---
src/hexen/p_inter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hexen/p_inter.c b/src/hexen/p_inter.c
index 8edb3ac7..26a0164c 100644
--- a/src/hexen/p_inter.c
+++ b/src/hexen/p_inter.c
@@ -2174,7 +2174,7 @@ void P_PoisonDamage(player_t * player, mobj_t * source, int damage,
{ // mobj is invulnerable
return;
}
- if (player && gameskill == sk_baby)
+ if (gameskill == sk_baby)
{
// Take half damage in trainer mode
damage >>= 1;
@@ -2203,7 +2203,7 @@ void P_PoisonDamage(player_t * player, mobj_t * source, int damage,
if (target->health <= 0)
{ // Death
target->special1.i = damage;
- if (player && inflictor && !player->morphTics)
+ if (inflictor && !player->morphTics)
{ // Check for flame death
if ((inflictor->flags2 & MF2_FIREDAMAGE)
&& (target->health > -50) && (damage > 25))