From: Martin Taibr Date: Thu, 10 Aug 2017 22:14:24 +0000 (+0200) Subject: damagetext: put insta inside macro, update description X-Git-Tag: xonotic-v0.8.5~2510^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=81808aef2c08b14011ea5a07f383d02c4de18a42;p=xonotic%2Fxonotic-data.pk3dir.git damagetext: put insta inside macro, update description --- 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);