From db6c096c61955acd2bea647aaaae4a8c7499ad4c Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 22 Jun 2018 17:00:39 +1000 Subject: [PATCH] Instead of checking for instagib, check if the death weapon is a vaporizer, allows damagetext to work in instagib with other weapons, and to filter vaporizer shots from regular modes --- qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc index b88d96d70..d9eacaae0 100644 --- a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc @@ -4,7 +4,7 @@ AUTOCVAR(sv_damagetext, int, 2, "<= 0: disabled, >= 1: visible to spectators, >= REGISTER_MUTATOR(damagetext, true); -#define SV_DAMAGETEXT_DISABLED() (autocvar_sv_damagetext <= 0 || MUTATOR_IS_ENABLED(mutator_instagib)) +#define SV_DAMAGETEXT_DISABLED() (autocvar_sv_damagetext <= 0) #define SV_DAMAGETEXT_SPECTATORS_ONLY() (autocvar_sv_damagetext >= 1) #define SV_DAMAGETEXT_PLAYERS() (autocvar_sv_damagetext >= 2) #define SV_DAMAGETEXT_ALL() (autocvar_sv_damagetext >= 3) @@ -16,6 +16,7 @@ MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) { const float armor = M_ARGV(3, float); const int deathtype = M_ARGV(5, int); const float potential_damage = M_ARGV(6, float); + if(DEATH_WEAPONOF(deathtype) == WEP_VAPORIZER) return; FOREACH_CLIENT(IS_REAL_CLIENT(it), { if ( (SV_DAMAGETEXT_ALL()) || -- 2.39.2