From 12544ddc364795af11b942f8da985ddd07a4a728 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 4 Sep 2010 14:12:43 +0300 Subject: [PATCH] Show the predator's name on the stomach board. --- data/qcsrc/client/sbar.qc | 15 +++++++++++---- data/qcsrc/server/vore.qc | 17 +++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 91825f72..daa86a56 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -2893,13 +2893,13 @@ void Sbar_Draw (void) 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 150 0', "stomach digesting", '14 14 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); + 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 150 0', "stomach full", '14 14 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL); + 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 150 0', "stomach empty", '14 14 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 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); + 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 @@ -2915,7 +2915,10 @@ void Sbar_Draw (void) continue; if(getstati(STAT_STOMACH_EATEN)) + { f = pl.pleater == getstati(STAT_STOMACH_EATEN); + dprint(strcat(ftos(getstati(STAT_STOMACH_EATEN)), "<<++++++++++++++++++++++\n")); + } else { if(spectatee_status) @@ -2929,6 +2932,10 @@ void Sbar_Draw (void) 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); } //} diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 268798a0..c8806b9f 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -80,7 +80,6 @@ void Vore_Swallow(entity e) e.alpha = -1; // best way of hiding / showing the eaten player e.aiment = e.eater; // follow the predator. Is automatically unset e.view_ofs_z /= 2; // best positioning for the stomach model - e.stat_eaten = num_for_edict(e.eater); // drop keys (KH) and flags (CTF) when we get swallowed kh_Key_DropAll(e, FALSE); @@ -107,7 +106,6 @@ void Vore_Regurgitate(entity e) e.solid = e.vore_oldsolid; e.alpha = default_player_alpha; // best way of hiding / showing the eaten player e.view_ofs_z *= 2; // best positioning for the stomach model - e.stat_eaten = 0; // velocities local vector oldforward, oldright, oldup; @@ -141,7 +139,6 @@ void Vore_Disconnect() if(self.eater.classname == "player") { self.view_ofs_z += 25; - self.stat_eaten = 0; self.eater.stomach_load -= 1; Vore_Weight_apply(self.eater); self.eater = world; @@ -238,10 +235,22 @@ void Vore_Gurglesound() void Vore() { // if we are free, show our stomach load on the HUD. Otherwise, show the predator's - if(self.eater.classname == "player") + 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) -- 2.39.2