X-Git-Url: https://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=blobdiff_plain;f=data%2Fqcsrc%2Fclient%2Fsbar.qc;h=60d5139f29797ecc8d7095c244e96fbe07b5833c;hp=e047e3bb9f61c6ea82af201e3c9c828ef5c586e5;hb=1d1f1251b5e836aa2d3bed03200d24ec4bb926d3;hpb=80b1fe478fef0a5cbe7784d8073f828be3457b86 diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index e047e3bb..60d5139f 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -513,7 +513,7 @@ void Cmd_Sbar_SetFields(float argc) if(str == strtolower(scores_label[j])) goto found; // sorry, but otherwise fteqcc -O3 miscompiles this and warns about "unreachable code" :notfound - if(str == "frags" && !gametype == GAME_RPG) + if(str == "frags" && !(gametype == GAME_RPG)) { j = SP_FRAGS; } @@ -2872,20 +2872,20 @@ void Sbar_Draw (void) fade = 3.2 - 2 * (time - weapontime); fade = bound(0.7, fade, 1); - if not(getstati(STAT_STOMACH_EATEN)) // useless if we're inside someone - { - if (cvar("viewsize") <= 100 && vid_conwidth <= 1600) { - if (teamplay) - drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach", '256 256 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color - else { - // allow for custom HUD colors in non-teamgames - color_x = cvar("sbar_color_bg_r"); - color_y = cvar("sbar_color_bg_g"); - color_z = cvar("sbar_color_bg_b"); - - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL); - } + if (cvar("viewsize") <= 100 && vid_conwidth <= 1600) { + if (teamplay) + drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach", '256 256 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color + else { + // allow for custom HUD colors in non-teamgames + color_x = cvar("sbar_color_bg_r"); + color_y = cvar("sbar_color_bg_g"); + color_z = cvar("sbar_color_bg_b"); + + drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL); } + } + //if not(getstati(STAT_STOMACH_EATEN)) // useless if we're inside someone + //{ float stomach_load; stomach_load = getstati(STAT_STOMACH_LOAD); @@ -2900,7 +2900,31 @@ void Sbar_Draw (void) drawstring(bottomleft - '-76 150 0', "stomach empty", '14 14 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); else drawstring(bottomleft - '-76 150 0', "stomach has prey", '14 14 0', '0.75 1 0.75', sbar_alpha_fg, DRAWFLAG_NORMAL); - } + //} + + // draw the stomach board + //if not(getstati(STAT_STOMACH_EATEN)) // useless if we're inside someone + //{ + entity pl; + float f; + + pos = bottomleft; + for(pl = players.sort_next; pl; pl = pl.sort_next) + { + if(pl.team == COLOR_SPECTATOR) + continue; + + if(spectatee_status) + f = pl.pleater == spectatee_status; + else + f = pl.pleater == player_localentnum; + if(f) + { + Sbar_PrintStomachboardItem(pos - '-16 124 0', pl); + pos_y += 1.25 * sbar_fontsize_y; + } + } + //} if (cvar("viewsize") <= 100 && vid_conwidth <= 1600) { if (teamplay) @@ -2938,30 +2962,6 @@ void Sbar_Draw (void) Sbar_DrawXNum(pos - '144 16 0', a, 3, 0, 16, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); } - // draw the stomach board - if not(getstati(STAT_STOMACH_EATEN)) // useless if we're inside someone - { - entity pl; - float f; - - pos = bottomleft; - for(pl = players.sort_next; pl; pl = pl.sort_next) - { - if(pl.team == COLOR_SPECTATOR) - continue; - - if(spectatee_status) - f = pl.pleater == spectatee_status; - else - f = pl.pleater == player_localentnum; - if(f) - { - Sbar_PrintStomachboardItem(pos - '-16 124 0', pl); - pos_y += 1.25 * sbar_fontsize_y; - } - } - } - // draw scores and timer Sbar_Score(); Sbar_Timer();