Fix number positioning with minus / plus
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 14 Apr 2011 21:12:38 +0000 (00:12 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 14 Apr 2011 21:12:38 +0000 (00:12 +0300)
data/qcsrc/client/sbar.qc

index 3c3acfb..50bddf0 100644 (file)
@@ -86,7 +86,6 @@ void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, fl
        if((showminusplus == 2 && num >= 0) || (num > 0 && showminusplus == 3))\r
        {\r
                plus = true;\r
-               pos_x -= lettersize;\r
        } else\r
                plus = false;   \r
 \r
@@ -94,7 +93,6 @@ void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, fl
        {\r
                minus = true;\r
                num = -num;\r
-               pos_x -= lettersize;\r
        } else\r
                minus = false;\r
 \r
@@ -141,13 +139,13 @@ void Sbar_DrawXNum (vector pos, float num, float digits, float showminusplus, fl
                if (stroke == 1)\r
                        drawstring(pos, "-", vsize, rgb, alpha, dflags);\r
                drawstring(pos, "-", vsize, num_color, alpha, dflags);\r
-               pos_x += lettersize;\r
+               pos_x += lettersize / 2;\r
        } else if(plus)\r
        {\r
                if (stroke == 1)\r
                        drawstring(pos, "+", vsize, rgb, alpha, dflags);\r
                drawstring(pos, "+", vsize, num_color, alpha, dflags);\r
-               pos_x += lettersize;\r
+               pos_x += lettersize / 2;\r
        }\r
 \r
        if (stroke == 1)\r