]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
scale damagetext more cleanly
authorMartin Taibr <taibr.martin@gmail.com>
Thu, 24 Nov 2016 23:08:56 +0000 (00:08 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Thu, 24 Nov 2016 23:08:56 +0000 (00:08 +0100)
qcsrc/common/mutators/mutator/damagetext/damagetext.qc

index a5c60c9a9ca1d4372976722aec6308689b9040b8..0ac58c7c3e56fbead94dfb337434d8ed68a51edf 100644 (file)
@@ -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);