From: Mario Date: Fri, 22 Jun 2018 07:00:39 +0000 (+1000) Subject: Instead of checking for instagib, check if the death weapon is a vaporizer, allows... X-Git-Tag: xonotic-v0.8.5~1992 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=db6c096c61955acd2bea647aaaae4a8c7499ad4c;p=xonotic%2Fxonotic-data.pk3dir.git 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 --- 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()) ||