]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_impulse.qc
Use IS_DEAD everywhere
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_impulse.qc
index c29c10f26bf5ac8f5f8390352011c6125cc472e2..917a95f178ef8ed23bbb653f427c287ce01db4d3 100644 (file)
@@ -53,7 +53,7 @@
 #define X(slot) \
        IMPULSE(weapon_group_##slot) \
        { \
-               if (this.deadflag != DEAD_NO) return; \
+               if (IS_DEAD(this)) return; \
                W_NextWeaponOnImpulse(slot); \
        }
 X(1)
@@ -74,7 +74,7 @@ X(0)
        IMPULSE(weapon_priority_##slot##_##dir) \
        { \
                if (this.vehicle) return; \
-               if (this.deadflag != DEAD_NO) return; \
+               if (IS_DEAD(this)) return; \
                noref int prev = -1; \
                noref int best =  0; \
                noref int next = +1; \
@@ -120,7 +120,7 @@ X(9, next)
        IMPULSE(weapon_byid_##i) \
        { \
                if (this.vehicle) return; \
-               if (this.deadflag != DEAD_NO) return; \
+               if (IS_DEAD(this)) return; \
                W_SwitchWeapon(Weapons_from(WEP_FIRST + i)); \
        }
 X(0)
@@ -152,70 +152,70 @@ X(23)
 IMPULSE(weapon_next_byid)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        W_NextWeapon(0);
 }
 
 IMPULSE(weapon_prev_byid)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        W_PreviousWeapon(0);
 }
 
 IMPULSE(weapon_next_bygroup)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        W_NextWeapon(1);
 }
 
 IMPULSE(weapon_prev_bygroup)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        W_PreviousWeapon(1);
 }
 
 IMPULSE(weapon_next_bypriority)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        W_NextWeapon(2);
 }
 
 IMPULSE(weapon_prev_bypriority)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        W_PreviousWeapon(2);
 }
 
 IMPULSE(weapon_last)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        W_LastWeapon(this);
 }
 
 IMPULSE(weapon_best)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        W_SwitchWeapon(w_getbestweapon(this));
 }
 
 IMPULSE(weapon_drop)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        W_ThrowWeapon(W_CalculateProjectileVelocity(this.velocity, v_forward * 750, false), '0 0 0', true);
 }
 
 IMPULSE(weapon_reload)
 {
        if (this.vehicle) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        if (forbidWeaponUse(this)) return;
        Weapon w = PS(this).m_weapon;
        entity actor = this;
@@ -363,7 +363,7 @@ IMPULSE(waypoint_personal_death)
 IMPULSE(waypoint_here_follow)
 {
        if (!teamplay) return;
-       if (this.deadflag != DEAD_NO) return;
+       if (IS_DEAD(this)) return;
        if (!MUTATOR_CALLHOOK(HelpMePing, this))
        {
                entity wp = WaypointSprite_Attach(WP_Helpme, true, RADARICON_HELPME);