From: otta8634 Date: Sun, 22 Dec 2024 05:24:19 +0000 (+0800) Subject: Properly check for InstaGib X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=072a2659eab0330d0d1e26fbffb6f5f29de12af9;p=xonotic%2Fxonotic-data.pk3dir.git Properly check for InstaGib Also remove include --- diff --git a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc index 11f10345b..6d552163d 100644 --- a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc @@ -1,7 +1,5 @@ #include "sv_damagetext.qh" -#include - AUTOCVAR(sv_damagetext, int, 2, "<= 0: disabled, >= 1: visible to spectators, >= 2: visible to attacker, >= 3: all players see everyone's damage"); REGISTER_MUTATOR(damagetext, true); @@ -69,7 +67,7 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) { float armor = M_ARGV(3, float); int deathtype = M_ARGV(5, int); float potential_damage = M_ARGV(6, float); - if(autocvar_g_instagib && DEATH_WEAPONOF(deathtype) == WEP_VAPORIZER) return; + if(MUTATOR_IS_ENABLED(mutator_instagib) && DEATH_WEAPONOF(deathtype) == WEP_VAPORIZER) return; static entity net_text_prev; static float net_damagetext_prev_time;