]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Second part; Show the stomach board of the eater as well
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 3 Sep 2010 23:19:14 +0000 (02:19 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 3 Sep 2010 23:19:14 +0000 (02:19 +0300)
data/qcsrc/client/sbar.qc
data/qcsrc/server/vore.qc

index 60d5139f29797ecc8d7095c244e96fbe07b5833c..438e3addb74683e7cae74482fb5793cc631d68f7 100644 (file)
@@ -2887,7 +2887,7 @@ void Sbar_Draw (void)
                //if not(getstati(STAT_STOMACH_EATEN)) // useless if we're inside someone\r
                //{\r
                        float stomach_load;\r
-                       stomach_load = getstati(STAT_STOMACH_LOAD);\r
+                       stomach_load = getstati(STAT_STOMACH_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise\r
 \r
                        Sbar_DrawXNum(bottomleft - '-18 170 0', bound(0, stomach_load, 9), 1, 0, 22, '1 1 1', 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                        drawstring(bottomleft - '-40 170 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
@@ -2914,10 +2914,14 @@ void Sbar_Draw (void)
                                if(pl.team == COLOR_SPECTATOR)\r
                                        continue;\r
 \r
-                               if(spectatee_status)\r
-                                       f = pl.pleater == spectatee_status;\r
+                               //if(spectatee_status)\r
+                               //      f = pl.pleater == spectatee_status;\r
+\r
+                               if(getstati(STAT_STOMACH_EATEN))\r
+                                       f = pl.pleater == getstati(STAT_STOMACH_EATEN);\r
                                else\r
                                        f = pl.pleater == player_localentnum;\r
+\r
                                if(f)\r
                                {\r
                                        Sbar_PrintStomachboardItem(pos - '-16 124 0', pl);\r
index 0e853a417f46ef2aec4b4e04cdd7fb3aada750ec..268798a0c11fad9af8803a7360e0394876df267f 100644 (file)
@@ -80,7 +80,7 @@ void Vore_Swallow(entity e)
        e.alpha = -1; // best way of hiding / showing the eaten player\r
        e.aiment = e.eater; // follow the predator. Is automatically unset\r
        e.view_ofs_z /= 2; // best positioning for the stomach model\r
-       e.stat_eaten = TRUE;\r
+       e.stat_eaten = num_for_edict(e.eater);\r
 \r
        // drop keys (KH) and flags (CTF) when we get swallowed\r
        kh_Key_DropAll(e, FALSE);\r
@@ -107,7 +107,7 @@ void Vore_Regurgitate(entity e)
                e.solid = e.vore_oldsolid;\r
        e.alpha = default_player_alpha; // best way of hiding / showing the eaten player\r
        e.view_ofs_z *= 2; // best positioning for the stomach model\r
-       e.stat_eaten = FALSE;\r
+       e.stat_eaten = 0;\r
 \r
        // velocities\r
        local vector oldforward, oldright, oldup;\r
@@ -141,7 +141,7 @@ void Vore_Disconnect()
        if(self.eater.classname == "player")\r
        {\r
                self.view_ofs_z += 25;\r
-               self.stat_eaten = FALSE;\r
+               self.stat_eaten = 0;\r
                self.eater.stomach_load -= 1;\r
                Vore_Weight_apply(self.eater);\r
                self.eater = world;\r