]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Use IS_DEAD everywhere
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index f792874a8218fae1e0b8c38c53ff149a8486e719..61ece1f59c9b05daf250ba25378979f91c0e53a5 100644 (file)
@@ -643,7 +643,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                                                damage = 0;
                                        else if(autocvar_teamplay_mode == 4)
                                        {
-                                               if(IS_PLAYER(targ) && targ.deadflag == DEAD_NO)
+                                               if(IS_PLAYER(targ) && !IS_DEAD(targ))
                                                {
                                                        attacker.dmg_team = attacker.dmg_team + damage;
                                                        complainteamdamage = attacker.dmg_team - autocvar_g_teamdamage_threshold;
@@ -855,7 +855,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                        self.velocity = self.velocity + farce;
                        self.move_velocity = self.velocity;
                }
-               self.flags &= ~FL_ONGROUND;
+               UNSET_ONGROUND(self);
                self.move_flags &= ~FL_ONGROUND;
                UpdateCSQCProjectile(self);
        }
@@ -1230,7 +1230,7 @@ void Fire_ApplyDamage(entity e)
        if(!IS_INDEPENDENT_PLAYER(e))
        if(!e.frozen)
                FOREACH_CLIENT(IS_PLAYER(it) && it != e, LAMBDA(
-                       if(it.deadflag == DEAD_NO)
+                       if(!IS_DEAD(it))
                        if(!IS_INDEPENDENT_PLAYER(it))
                        if(boxesoverlap(e.absmin, e.absmax, it.absmin, it.absmax))
                        {