}\r
\r
void CSQC_Strength_Timer() {\r
- vector pos;\r
- vector bottomright;\r
-\r
- bottomright_x = vid_conwidth;\r
- bottomright_y = vid_conheight;\r
- bottomright_z = 0;\r
-\r
float stat_items, dt;\r
stat_items = getstati(STAT_ITEMS);\r
/*\r
if (getstati(STAT_HEALTH) <= 0)\r
return;\r
\r
- vector picsize;\r
- float strength_time, invincibility_time, countdown_fontsize;\r
-\r
- picsize = '22 22 0';\r
- countdown_fontsize = 18;\r
-\r
- pos = bottomright - '34 48 0';\r
+ vector pos, sz;\r
+ float strength_time, invincibility_time;\r
\r
//strength\r
strength_time = getstatf(STAT_STRENGTH_FINISHED);\r
- invincibility_time = getstatf(STAT_INVINCIBLE_FINISHED);\r
-\r
if (strength_time) {\r
dt = strength_time - time;\r
+ pos = Sbar_ConvertToScreen_PicPosition(stov(cvar_string("hud_item_strength_icon_position")), stov(cvar_string("hud_item_strength_icon_scale")));\r
+ sz = Sbar_ConvertToScreen_PicScale(stov(cvar_string("hud_item_strength_icon_scale")));\r
if(dt > 0)\r
{\r
if(dt < 5)\r
{\r
- drawpic_expanding_two(pos, "gfx/hud/sb_str", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
+ drawpic_expanding_two(pos, "gfx/hud/sb_str", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
bound(0, (ceil(dt) - dt) / 0.5, 1));\r
}\r
else\r
{\r
- drawpic(pos, "gfx/hud/sb_str", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+ drawpic(pos, "gfx/hud/sb_str", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
}\r
- Sbar_DrawXNum(pos - '30 -2 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(stov(cvar_string("hud_item_strength_text_position")), ceil(dt), 2, 0, cvar("hud_item_strength_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else if(dt > -1)\r
{\r
- drawpic_expanding(pos, "gfx/hud/sb_str", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
+ drawpic_expanding(pos, "gfx/hud/sb_str", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
bound(0, -dt / 0.5, 1));\r
}\r
}\r
\r
//invincibility\r
+ invincibility_time = getstatf(STAT_INVINCIBLE_FINISHED);\r
if (invincibility_time) {\r
dt = invincibility_time - time;\r
+ pos = Sbar_ConvertToScreen_PicPosition(stov(cvar_string("hud_item_invincible_icon_position")), stov(cvar_string("hud_item_invincible_icon_scale")));\r
+ sz = Sbar_ConvertToScreen_PicScale(stov(cvar_string("hud_item_invincible_icon_scale")));\r
if(dt > 0)\r
{\r
if(dt < 5)\r
{\r
- drawpic_expanding_two(pos - '0 -22 0', "gfx/hud/sb_invinc", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
+ drawpic_expanding_two(pos, "gfx/hud/sb_invinc", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
bound(0, (ceil(dt) - dt) / 0.5, 1));\r
}\r
else\r
{\r
- drawpic(pos - '0 -22 0', "gfx/hud/sb_invinc", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+ drawpic(pos, "gfx/hud/sb_invinc", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
}\r
- Sbar_DrawXNum(pos - '30 -24 0', ceil(dt), 2, 0, countdown_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ Sbar_DrawXNum(stov(cvar_string("hud_item_invincible_text_position")), ceil(dt), 2, 0, cvar("hud_item_invincible_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else if(dt > -1)\r
{\r
- drawpic_expanding(pos - '0 -22 0', "gfx/hud/sb_invinc", picsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
+ drawpic_expanding(pos, "gfx/hud/sb_invinc", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE,\r
bound(0, -dt / 0.5, 1));\r
}\r
}\r