sbar_field[sbar_num_fields] = SP_END;\r
}\r
\r
+string Sbar_GetTexture(string img)\r
+{\r
+ string path = cvar_string("hud_style");\r
+ return strcat("gfx/hud/", path, "/", img);\r
+}\r
+\r
// MOVEUP::\r
vector sbar_field_rgb;\r
string sbar_field_icon0;\r
{\r
f = stof(getplayerkey(pl.sv_entnum, "colors"));\r
{\r
- sbar_field_icon0 = "gfx/sb_playercolor_base";\r
- sbar_field_icon1 = "gfx/sb_playercolor_shirt";\r
+ sbar_field_icon0 = Sbar_GetTexture("sb_playercolor_base");\r
+ sbar_field_icon1 = Sbar_GetTexture("sb_playercolor_shirt");\r
sbar_field_icon1_rgb = colormapPaletteColor(floor(f / 16), 0);\r
- sbar_field_icon2 = "gfx/sb_playercolor_pants";\r
+ sbar_field_icon2 = Sbar_GetTexture("sb_playercolor_pants");\r
sbar_field_icon2_rgb = colormapPaletteColor(mod(f, 16), 1);\r
}\r
}\r
return colorfade_current;\r
}\r
\r
-string Sbar_GetTexture(string img)\r
-{\r
- string path = cvar_string("hud_style");\r
- return strcat("gfx/hud/", path, "/", img);\r
-}\r
-\r
float xmin, xmax, ymin, ymax, sbwidth;\r
float sbar_fixscoreboardcolumnwidth_len;\r
float sbar_fixscoreboardcolumnwidth_iconlen;\r
sz_x = dimensions_x * cvar("hud_item_preylist_colors_length");\r
\r
f = stof(getplayerkey(pl.sv_entnum, "colors"));\r
- drawpic(pos, "gfx/sb_playercolor_base", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos, "gfx/sb_playercolor_shirt", sz, colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos, "gfx/sb_playercolor_pants", sz, colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_playercolor_base"), sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_playercolor_shirt"), sz, colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_playercolor_pants"), sz, colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
pos_x = position_x + dimensions_x * cvar("hud_item_preylist_name_location");\r
sz_x = dimensions_x * cvar("hud_item_preylist_name_length");\r
pos_x = position_x + dimensions_x * cvar("hud_item_predator_colors_location");\r
sz_x = dimensions_x * cvar("hud_item_predator_colors_length");\r
f = stof(getplayerkey(pl.sv_entnum, "colors"));\r
- drawpic(pos, "gfx/sb_playercolor_base", sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos, "gfx/sb_playercolor_shirt", sz, colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- drawpic(pos, "gfx/sb_playercolor_pants", sz, colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_playercolor_base"), sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_playercolor_shirt"), sz, colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, Sbar_GetTexture("sb_playercolor_pants"), sz, colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
pos_x = position_x + dimensions_x * cvar("hud_item_predator_name_location");\r
sz_x = dimensions_x * cvar("hud_item_predator_name_length");\r