]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Show the predator's name on the stomach board.
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 4 Sep 2010 11:12:43 +0000 (14:12 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 4 Sep 2010 11:12:43 +0000 (14:12 +0300)
data/qcsrc/client/sbar.qc
data/qcsrc/server/vore.qc

index 91825f7239b1665bfcbf774011e464aefdaea1a1..daa86a564eec547ceec47abef3a751f46f603711 100644 (file)
@@ -2893,13 +2893,13 @@ void Sbar_Draw (void)
                        drawstring(bottomleft - '-40 170 0', "/", '22 22 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                        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);\r
                        if(getstati(STAT_STOMACH_DIGESTING))\r
-                               drawstring(bottomleft - '-76 150 0', "stomach digesting", '14 14 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               drawstring(bottomleft - '-76 142 0', "stomach digesting", '12 12 0', '1 0.5 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                        else if(stomach_load == g_balance_vore_swallow_limit)\r
-                               drawstring(bottomleft - '-76 150 0', "stomach full", '14 14 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               drawstring(bottomleft - '-76 142 0', "stomach full", '12 12 0', '0.5 1 0.5', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                        else if(!stomach_load)\r
-                               drawstring(bottomleft - '-76 150 0', "stomach empty", '14 14 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               drawstring(bottomleft - '-76 142 0', "stomach empty", '12 12 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                        else\r
-                               drawstring(bottomleft - '-76 150 0', "stomach has prey", '14 14 0', '0.75 1 0.75', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               drawstring(bottomleft - '-76 142 0', "stomach has prey", '12 12 0', '0.75 1 0.75', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                //}\r
 \r
                // draw the stomach board\r
@@ -2915,7 +2915,10 @@ void Sbar_Draw (void)
                                        continue;\r
 \r
                                if(getstati(STAT_STOMACH_EATEN))\r
+                               {\r
                                        f = pl.pleater == getstati(STAT_STOMACH_EATEN);\r
+                                       dprint(strcat(ftos(getstati(STAT_STOMACH_EATEN)), "<<++++++++++++++++++++++\n"));\r
+                               }\r
                                else\r
                                {\r
                                        if(spectatee_status)\r
@@ -2929,6 +2932,10 @@ void Sbar_Draw (void)
                                        Sbar_PrintStomachboardItem(pos - '-16 124 0', pl);\r
                                        pos_y += 1.25 * sbar_fontsize_y;\r
                                }\r
+\r
+                               if(getstati(STAT_STOMACH_EATEN))\r
+                               if(pl.sv_entnum == getstati(STAT_STOMACH_EATEN) - 1)\r
+                                       Sbar_PrintStomachboardItem(pos - '-76 156 0', pl);\r
                        }\r
                //}\r
 \r
index 268798a0c11fad9af8803a7360e0394876df267f..c8806b9f98f32bb677919ebe139c33c069effa82 100644 (file)
@@ -80,7 +80,6 @@ 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 = 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 +106,6 @@ 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 = 0;\r
 \r
        // velocities\r
        local vector oldforward, oldright, oldup;\r
@@ -141,7 +139,6 @@ void Vore_Disconnect()
        if(self.eater.classname == "player")\r
        {\r
                self.view_ofs_z += 25;\r
-               self.stat_eaten = 0;\r
                self.eater.stomach_load -= 1;\r
                Vore_Weight_apply(self.eater);\r
                self.eater = world;\r
@@ -238,10 +235,22 @@ void Vore_Gurglesound()
 void Vore()\r
 {\r
        // if we are free, show our stomach load on the HUD. Otherwise, show the predator's\r
-       if(self.eater.classname == "player")\r
+       string x;\r
+       if(self.eater != self && self.eater.classname == "player")\r
+       {\r
                self.stat_stomachload = self.eater.stomach_load;\r
+               self.stat_eaten = num_for_edict(self.eater);\r
+               x = playername(self.eater);\r
+               //bprint(strcat(ftos(self.stat_eaten), "<<--------------------------\n"));\r
+       }\r
        else\r
+       {\r
                self.stat_stomachload = self.stomach_load;\r
+               self.stat_eaten = 0;\r
+               x = "NONE!";\r
+       }\r
+       //bprint(strcat(ftos(self.stat_eaten), "<<--------------------------\n"));\r
+       //bprint(strcat(playername(self), "<<--------------------------\n"));\r
 \r
        // skip the vore system under some circumstances\r
        if(time < game_starttime)\r