From 2154c81a835af0b67661ce6723adbf1b4fca8a68 Mon Sep 17 00:00:00 2001 From: Martin Taibr Date: Thu, 22 Dec 2016 21:54:14 +0100 Subject: [PATCH] enable damagetext while updating the format --- qcsrc/common/mutators/mutator/damagetext/damagetext.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc index 3d293d8f8..fd873efb9 100644 --- a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc @@ -19,7 +19,12 @@ AUTOCVAR_SAVE(cl_damagetext_format, string, "-{total}", "How to AUTOCVAR_SAVE(cl_damagetext_format_verbose, bool, false, "{health} shows {potential_health} too when they differ; {total} shows {potential} too when they differ"); AUTOCVAR_SAVE(cl_damagetext_format_hide_redundant, bool, false, "hide {armor} if 0; hide {potential} and {potential_health} when same as actual"); STATIC_INIT(DamageText_LegacyFormat) { - if (strstrofs(autocvar_cl_damagetext_format, "{", 0) < 0) autocvar_cl_damagetext_format = "-{total}"; + // damagetext used to be off by default and the cvar got saved in people's configs along with the old format + // enable damagetext while updating the format for a one time effect + if (strstrofs(autocvar_cl_damagetext_format, "{", 0) < 0) { + localcmd("\nseta cl_damagetext 1\n"); + localcmd("\nseta cl_damagetext_format -{total}\n"); + }; } AUTOCVAR_SAVE(cl_damagetext_color, vector, '1 1 0', "Damage text color"); AUTOCVAR_SAVE(cl_damagetext_color_per_weapon, bool, false, "Damage text uses weapon color"); -- 2.39.2