From: MirceaKitsune Date: Sat, 4 Sep 2010 11:15:10 +0000 (+0300) Subject: Put our tools back in the shelf once our work is done. Also remove the now useless... X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=829dd8207468230c9ce035a8c5622af026e932bb;p=voretournament%2Fvoretournament.git Put our tools back in the shelf once our work is done. Also remove the now useless if() statements. --- diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index daa86a56..2ef328c0 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -2884,60 +2884,53 @@ void Sbar_Draw (void) 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); // shows the predator's stomach load when we are eaten, and ours otherwise - - Sbar_DrawXNum(bottomleft - '-18 170 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(bottomleft - '-40 170 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - Sbar_DrawXNum(bottomleft - '-50 170 0', bound(0, g_balance_vore_swallow_limit, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); - if(getstati(STAT_STOMACH_DIGESTING)) - drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); - else if(stomach_load == g_balance_vore_swallow_limit) - drawstring(bottomleft - '-76 142 0', "stomach full", '12 12 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); - else if(!stomach_load) - drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); - else - drawstring(bottomleft - '-76 142 0', "stomach has prey", '12 12 0', '0.75 1 0.75', sbar_alpha_fg, DRAWFLAG_NORMAL); - //} + float stomach_load; + stomach_load = getstati(STAT_STOMACH_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise + + Sbar_DrawXNum(bottomleft - '-18 170 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); + drawstring(bottomleft - '-40 170 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + Sbar_DrawXNum(bottomleft - '-50 170 0', bound(0, g_balance_vore_swallow_limit, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL); + if(getstati(STAT_STOMACH_DIGESTING)) + drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); + else if(stomach_load == g_balance_vore_swallow_limit) + drawstring(bottomleft - '-76 142 0', "stomach full", '12 12 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); + else if(!stomach_load) + drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + else + drawstring(bottomleft - '-76 142 0', "stomach has prey", '12 12 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; + entity pl; + float f; - pos = bottomleft; - for(pl = players.sort_next; pl; pl = pl.sort_next) - { - if(pl.team == COLOR_SPECTATOR) - continue; + pos = bottomleft; + for(pl = players.sort_next; pl; pl = pl.sort_next) + { + if(pl.team == COLOR_SPECTATOR) + continue; - if(getstati(STAT_STOMACH_EATEN)) - { - f = pl.pleater == getstati(STAT_STOMACH_EATEN); - dprint(strcat(ftos(getstati(STAT_STOMACH_EATEN)), "<<++++++++++++++++++++++\n")); - } + if(getstati(STAT_STOMACH_EATEN)) + { + f = pl.pleater == getstati(STAT_STOMACH_EATEN); + } + else + { + if(spectatee_status) + f = pl.pleater == spectatee_status; else - { - 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; - } + f = pl.pleater == player_localentnum; + } - if(getstati(STAT_STOMACH_EATEN)) - if(pl.sv_entnum == getstati(STAT_STOMACH_EATEN) - 1) - Sbar_PrintStomachboardItem(pos - '-76 156 0', pl); + if(f) + { + Sbar_PrintStomachboardItem(pos - '-16 124 0', pl); + pos_y += 1.25 * sbar_fontsize_y; } - //} + + if(getstati(STAT_STOMACH_EATEN)) + if(pl.sv_entnum == getstati(STAT_STOMACH_EATEN) - 1) + Sbar_PrintStomachboardItem(pos - '-76 156 0', pl); + } if (cvar("viewsize") <= 100 && vid_conwidth <= 1600) { if (teamplay) diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index c8806b9f..bb35b189 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -235,22 +235,16 @@ void Vore_Gurglesound() void Vore() { // if we are free, show our stomach load on the HUD. Otherwise, show the predator's - string x; if(self.eater != self && self.eater.classname == "player") { self.stat_stomachload = self.eater.stomach_load; self.stat_eaten = num_for_edict(self.eater); - x = playername(self.eater); - //bprint(strcat(ftos(self.stat_eaten), "<<--------------------------\n")); } else { self.stat_stomachload = self.stomach_load; self.stat_eaten = 0; - x = "NONE!"; } - //bprint(strcat(ftos(self.stat_eaten), "<<--------------------------\n")); - //bprint(strcat(playername(self), "<<--------------------------\n")); // skip the vore system under some circumstances if(time < game_starttime)