From: MirceaKitsune Date: Fri, 3 Sep 2010 23:19:14 +0000 (+0300) Subject: Second part; Show the stomach board of the eater as well X-Git-Url: https://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=d4f082640c5df19a5e3aa01b0326870d07820e2f Second part; Show the stomach board of the eater as well --- diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 60d5139f..438e3add 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -2887,7 +2887,7 @@ void Sbar_Draw (void) //if not(getstati(STAT_STOMACH_EATEN)) // useless if we're inside someone //{ float stomach_load; - stomach_load = getstati(STAT_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); @@ -2914,10 +2914,14 @@ void Sbar_Draw (void) if(pl.team == COLOR_SPECTATOR) continue; - if(spectatee_status) - f = pl.pleater == spectatee_status; + //if(spectatee_status) + // f = pl.pleater == spectatee_status; + + if(getstati(STAT_STOMACH_EATEN)) + f = pl.pleater == getstati(STAT_STOMACH_EATEN); else f = pl.pleater == player_localentnum; + if(f) { Sbar_PrintStomachboardItem(pos - '-16 124 0', pl); diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 0e853a41..268798a0 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -80,7 +80,7 @@ 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 = TRUE; + 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 +107,7 @@ 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 = FALSE; + e.stat_eaten = 0; // velocities local vector oldforward, oldright, oldup; @@ -141,7 +141,7 @@ void Vore_Disconnect() if(self.eater.classname == "player") { self.view_ofs_z += 25; - self.stat_eaten = FALSE; + self.stat_eaten = 0; self.eater.stomach_load -= 1; Vore_Weight_apply(self.eater); self.eater = world;