]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Show minus health for prey on the stomach board
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 17:46:58 +0000 (20:46 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 31 Jul 2011 17:46:58 +0000 (20:46 +0300)
data/qcsrc/client/Main.qc
data/qcsrc/client/sbar.qc
data/qcsrc/server/g_world.qc

index d9449353761b1a90205c748fcb0e4ec61cf1f0c3..1fe179af70338ab9c2f557a5433437d50cc0ac4f 100644 (file)
@@ -1250,7 +1250,7 @@ void Net_ReadOtherPLReport()
 {\r
        float e, ph, pn;\r
        e = ReadByte();\r
-       ph = ReadByte();\r
+       ph = ReadShort(); // not WriteByte because we show minus health too\r
        pn = ReadByte();\r
        if not(playerslots[e])\r
                return;\r
index 4250c12086406ff6d4ee39f7943f5b561548d73d..94c038e6233712698266e1d73466901ce64904b0 100644 (file)
@@ -952,8 +952,7 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl)
                        drawcolorcodedstring(pos, textShortenToWidth(str, 138, '11 11 0', stringwidth_colors), '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                }\r
 \r
-               if(field == ST_HEALTH)\r
-               if(stof(str) > 0) {\r
+               if(field == ST_HEALTH) {\r
                        pos_x += 138;\r
                                if(pl.sv_entnum == player_localentnum - 1 || (spectatee_status && pl.sv_entnum == spectatee_status - 1))\r
                                        drawcolorcodedstring(pos, "self", '11 11 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
index 13ad0071b5eeadf572f11409fd86491908e26b4b..f0022c7b89f106c3e900177908b5ee00cfd7a659 100644 (file)
@@ -52,14 +52,14 @@ void OtherPLReport_Think()
        if(e.stat_eaten) // tempt hackers less by only sending the info of eaten players\r
        {\r
                if(cvar("g_vore_showhealth"))\r
-                       WriteByte(MSG_BROADCAST, e.health);\r
+                       WriteShort(MSG_BROADCAST, e.health); // not WriteByte because we show minus health too\r
                else\r
-                       WriteByte(MSG_BROADCAST, 0);\r
+                       WriteShort(MSG_BROADCAST, 0);\r
                WriteByte(MSG_BROADCAST, num_for_edict(e.predator));\r
        }\r
        else\r
        {\r
-               WriteByte(MSG_BROADCAST, 0);\r
+               WriteShort(MSG_BROADCAST, 0);\r
                WriteByte(MSG_BROADCAST, 0);\r
        }\r
        self.cnt = mod(self.cnt + 1, maxclients);\r