float fieldcounter;\r
void Sbar_PrintStomachboardItem(vector pos, entity pl)\r
{\r
- vector tmp, rgb;\r
- rgb = GetTeamRGB(pl.team);\r
string str;\r
float f, field;\r
\r
- // Layout:\r
- tmp_x = sbwidth;\r
- tmp_y = sbar_fontsize_y * 1.25;\r
- tmp_z = 0;\r
-\r
for(fieldcounter = 1; fieldcounter <= 2; ++fieldcounter)\r
{\r
field = -fieldcounter;\r
}\r
\r
if(field == ST_HEALTH)\r
- if(g_vore_showpreyhealth && stof(str)) { // only if player health is not 0\r
+ if(g_vore_showpreyhealth) {\r
pos_x += 138;\r
if(pl.sv_entnum == player_localentnum - 1 || (spectatee_status && pl.sv_entnum == spectatee_status - 1))\r
drawcolorcodedstring(pos, " me", '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
}\r
\r
+void Sbar_PrintStomachboardItemPred(vector pos, entity pl)\r
+{\r
+ string str;\r
+ float f, field;\r
+\r
+ for(fieldcounter = 1; fieldcounter <= 2; ++fieldcounter)\r
+ {\r
+ field = -fieldcounter;\r
+ if(field == SP_SEPARATOR)\r
+ break;\r
+\r
+ str = Sbar_GetStomachField(pl, field);\r
+\r
+ if(field == ST_NAME) {\r
+ f = stof(getplayerkey(pl.sv_entnum, "colors"));\r
+ drawpic(pos, "gfx/sb_playercolor_base", '22 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, "gfx/sb_playercolor_shirt", '22 11 0', colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ drawpic(pos, "gfx/sb_playercolor_pants", '22 11 0', colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+\r
+ pos_x += 24;\r
+ drawcolorcodedstring(pos, str, '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+ }\r
+ }\r
+}\r
+\r
/*\r
* Sbar_Scoreboard_MakeTable\r
*\r
\r
if(getstati(STAT_STOMACH_EATEN))\r
if(pl.sv_entnum == getstati(STAT_STOMACH_EATEN) - 1)\r
- Sbar_PrintStomachboardItem(pos - '-76 156 0', pl);\r
+ Sbar_PrintStomachboardItemPred(pos - '-76 156 0', pl);\r
}\r
\r
if (cvar("viewsize") <= 100 && vid_conwidth <= 1600) {\r