shithub: choc

Download patch

ref: 1b06590a72efd79fce90d91adfa0694e31a7c3e5
parent: af9838404b695a26ee18df205affc4a4e0af40f2
author: mfrancis95 <[email protected]>
date: Sun Dec 8 19:22:24 EST 2019

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

--- a/src/hexen/p_inter.c
+++ b/src/hexen/p_inter.c
@@ -2174,7 +2174,7 @@
     {                           // 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 @@
     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))