From 81808aef2c08b14011ea5a07f383d02c4de18a42 Mon Sep 17 00:00:00 2001 From: Martin Taibr Date: Fri, 11 Aug 2017 00:14:24 +0200 Subject: [PATCH] damagetext: put insta inside macro, update description --- .../mutators/mutator/damagetext/sv_damagetext.qc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc index 7e9608642..4a18cc930 100644 --- a/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/sv_damagetext.qc @@ -1,15 +1,15 @@ #include "sv_damagetext.qh" -AUTOCVAR(sv_damagetext, int, 2, "<= 0: disabled, >= 1: spectators, >= 2: players, >= 3: all players"); +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); -#define SV_DAMAGETEXT_DISABLED() (autocvar_sv_damagetext <= 0 /* disabled */) -#define SV_DAMAGETEXT_SPECTATORS_ONLY() (autocvar_sv_damagetext >= 1 /* spectators only */) -#define SV_DAMAGETEXT_PLAYERS() (autocvar_sv_damagetext >= 2 /* players */) -#define SV_DAMAGETEXT_ALL() (autocvar_sv_damagetext >= 3 /* all players */) +#define SV_DAMAGETEXT_DISABLED() (autocvar_sv_damagetext <= 0 || autocvar_g_instagib) +#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) MUTATOR_HOOKFUNCTION(damagetext, PlayerDamaged) { - if (SV_DAMAGETEXT_DISABLED() || autocvar_g_instagib) return; + if (SV_DAMAGETEXT_DISABLED()) return; const entity attacker = M_ARGV(0, entity); const entity hit = M_ARGV(1, entity); if (hit == attacker) return; const float health = M_ARGV(2, float); -- 2.39.2