float fieldcounter;\r
void Sbar_PrintStomachboardItem(vector pos, entity pl)\r
{\r
+ // list the players in the stomach\r
+\r
string str;\r
float f, field;\r
\r
}\r
\r
if(field == ST_HEALTH)\r
- if(g_vore_showpreyhealth && stof(str)) { // only if player health is not 0. Also used to hide the predators health\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, "self", '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
}\r
\r
+float fieldcounter2;\r
+void Sbar_PrintStomachboardItem2(vector pos, entity pl)\r
+{\r
+ // show the name of our eater\r
+\r
+ string str;\r
+ float f, field;\r
+\r
+ for(fieldcounter2 = 1; fieldcounter2 <= 2; ++fieldcounter2)\r
+ {\r
+ field = -fieldcounter2;\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(bottomleft - '-76 156 0', pl);\r
+ Sbar_PrintStomachboardItem2(bottomleft - '-76 156 0', pl);\r
}\r
\r
if (cvar("viewsize") <= 100 && vid_conwidth <= 1600) {\r