From: MirceaKitsune Date: Sat, 4 Sep 2010 12:36:58 +0000 (+0300) Subject: Undo last commit. The issue I was trying to fix was caused by something else X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a5b7a909b537582a0896b7484a58b23207ebc181;p=voretournament%2Fvoretournament.git Undo last commit. The issue I was trying to fix was caused by something else --- diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index c03ac713..665abaa1 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -949,9 +949,16 @@ void Sbar_PrintScoreboardItem(vector pos, entity pl, float is_self, float pl_num float fieldcounter; void Sbar_PrintStomachboardItem(vector pos, entity pl) { + vector tmp, rgb; + rgb = GetTeamRGB(pl.team); string str; float f, field; + // Layout: + tmp_x = sbwidth; + tmp_y = sbar_fontsize_y * 1.25; + tmp_z = 0; + for(fieldcounter = 1; fieldcounter <= 2; ++fieldcounter) { field = -fieldcounter; @@ -971,7 +978,7 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) } if(field == ST_HEALTH) - if(g_vore_showpreyhealth) { + if(g_vore_showpreyhealth && stof(str)) { // only if player health is not 0 pos_x += 138; if(pl.sv_entnum == player_localentnum - 1 || (spectatee_status && pl.sv_entnum == spectatee_status - 1)) drawcolorcodedstring(pos, " me", '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL); @@ -986,31 +993,6 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) } } -void Sbar_PrintStomachboardItemPred(vector pos, entity pl) -{ - string str; - float f, field; - - for(fieldcounter = 1; fieldcounter <= 2; ++fieldcounter) - { - field = -fieldcounter; - if(field == SP_SEPARATOR) - break; - - str = Sbar_GetStomachField(pl, field); - - if(field == ST_NAME) { - f = stof(getplayerkey(pl.sv_entnum, "colors")); - drawpic(pos, "gfx/sb_playercolor_base", '22 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - drawpic(pos, "gfx/sb_playercolor_shirt", '22 11 0', colormapPaletteColor(floor(f / 16), 0), sbar_alpha_fg, DRAWFLAG_NORMAL); - drawpic(pos, "gfx/sb_playercolor_pants", '22 11 0', colormapPaletteColor(mod(f, 16), 1), sbar_alpha_fg, DRAWFLAG_NORMAL); - - pos_x += 24; - drawcolorcodedstring(pos, str, '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL); - } - } -} - /* * Sbar_Scoreboard_MakeTable * @@ -2951,7 +2933,7 @@ void Sbar_Draw (void) if(getstati(STAT_STOMACH_EATEN)) if(pl.sv_entnum == getstati(STAT_STOMACH_EATEN) - 1) - Sbar_PrintStomachboardItemPred(pos - '-76 156 0', pl); + Sbar_PrintStomachboardItem(bottomleft - '-76 156 0', pl); } if (cvar("viewsize") <= 100 && vid_conwidth <= 1600) {