From: Martin Taibr Date: Thu, 24 Nov 2016 23:08:56 +0000 (+0100) Subject: scale damagetext more cleanly X-Git-Tag: xonotic-v0.8.2~169^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=30c348a9b2a87c879f28cd2724b6a3cde0210e4b;p=xonotic%2Fxonotic-data.pk3dir.git scale damagetext more cleanly --- diff --git a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc index a5c60c9a9..0ac58c7c3 100644 --- a/qcsrc/common/mutators/mutator/damagetext/damagetext.qc +++ b/qcsrc/common/mutators/mutator/damagetext/damagetext.qc @@ -74,7 +74,10 @@ CLASS(DamageText, Object) if (w != WEP_Null) rgb = w.wpcolor; } - drawcolorcodedstring2_builtin(pos, this.text, this.m_size * '1 1 0', rgb, this.alpha, DRAWFLAG_NORMAL); + vector drawfontscale_save = drawfontscale; + drawfontscale = (this.m_size / autocvar_cl_damagetext_size_max) * '1 1 0'; + drawcolorcodedstring2_builtin(pos, this.text, autocvar_cl_damagetext_size_max * '1 1 0', rgb, this.alpha, DRAWFLAG_NORMAL); + drawfontscale = drawfontscale_save; } } ATTRIB(DamageText, draw2d, void(DamageText), DamageText_draw2d);