]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Fix player names showing for prey
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 15 Mar 2012 14:16:28 +0000 (16:16 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 15 Mar 2012 14:16:28 +0000 (16:16 +0200)
data/qcsrc/client/Main.qc
data/qcsrc/client/shownames.qc
data/qcsrc/client/shownames.qh
data/qcsrc/server/ent_cs.qc
docs/Release notes.txt
docs/TODO.txt

index 4a106a31007690603b2e9de09b776937967260dc..7006f429558aa6c2f6748bae78d77c481c692259 100644 (file)
@@ -688,6 +688,8 @@ void Ent_ReadEntCS()
                self.healthvalue = ReadShort();\r
        if(sf & 16)\r
                self.armorvalue = ReadShort();\r
+       if(sf & 32)\r
+               self.eaten = ReadByte();\r
 \r
        entcs_receiver[self.sv_entnum] = self;\r
        self.entremove = Ent_RemoveEntCS;\r
index f3edd2820ef40f234334ab922483d369a8b9cec2..eae0e54b041cd8bb583a82a8f3f1a0fbe8bbbecf 100644 (file)
@@ -15,6 +15,8 @@ void Draw_ShowNames(entity ent)
                return;
        if(getstati(STAT_VORE_EATEN) && cvar("cl_vore_stomachmodel") >= 1 && !cvar("chase_active"))
                return;
+       if(ent.eaten)
+               return;
 
        float sameteam;
        if(teamplay && (GetPlayerColor(player_localentnum - 1) == GetPlayerColor(ent.sv_entnum - 1)))
@@ -168,11 +170,13 @@ void Draw_ShowNames_All()
                {
                        e.healthvalue = entcs.healthvalue;
                        e.armorvalue = entcs.armorvalue;
+                       e.eaten = entcs.eaten;
                }
                else
                {
                        e.healthvalue = 2342;
                        e.armorvalue = 0;
+                       e.eaten = 0;
                }
 
                e.origin = getplayerorigin(i);
index 62aaae2be1b0692f861de061a1b6c1daa756148f..b2d167d2991fbecf468e49de4a598202213cbc60 100644 (file)
@@ -1,2 +1,3 @@
 .float healthvalue;
 .float armorvalue;
+.float eaten;
index 0743388fc5dd6fa201f367fd87c27ffe142953db..687e9d544a7ebc14c577dd070ce70c31ef04676d 100644 (file)
@@ -30,8 +30,6 @@ float entcs_customize()
                return FALSE;\r
        if(other == o)\r
                return FALSE;\r
-       if(o.stat_eaten)\r
-               return FALSE;\r
        return TRUE;\r
 }\r
 \r
@@ -53,6 +51,8 @@ float entcs_send(entity to, float sf)
                WriteShort(MSG_ENTITY, self.health);\r
        if(sf & 16)\r
                WriteShort(MSG_ENTITY, self.armorvalue);\r
+       if(sf & 32)\r
+               WriteByte(MSG_ENTITY, self.stat_eaten);\r
        return TRUE;\r
 };\r
 \r
@@ -83,6 +83,11 @@ void entcs_think()
                self.armorvalue = o.armorvalue;\r
                self.SendFlags |= 16;\r
        }\r
+       if(o.stat_eaten != self.stat_eaten)\r
+       {\r
+               self.stat_eaten = o.stat_eaten;\r
+               self.SendFlags |= 32;\r
+       }\r
 };\r
 \r
 entity attach_entcs()\r
index a81a3e55b24a93b3b0721069f3306804d0e3f7a9..777d5d50caf9243ef37f6a85c201f726df27220d 100644 (file)
@@ -276,6 +276,8 @@ Bug fixes:
 \r
 - If holding the alt fire button while reloading, the grabber would fire the hook (and take ammo) after reload, but the hook would not spawn.\r
 \r
+- Fix floating player names showing for prey, which was both wrong and caused overlapping.\r
+\r
 Features:\r
 \r
 - There is no longer a player swallow limit. Players have a stomach capacity (for predators) and a mass (for prey), both based on player scale. As long as your mass is not exceeded, you can keep swallowing players. This affects your weight and overall player capacity based on player size as well. eg: You might be able to eat only one large player, three tiny players, or two normal sized players at the same time. Stomach size will also reflect your capacity, not the player count, being bigger or smaller based on the prey inside and their size compared to yours. By default, a macro can swallow up to 15 mircos and a micro up to 1 macro.\r
index 246c53671ab06c9eb702a1908f25c880e3568391..83c21598b543cb82b022b17814bb82ea2a5c6c96 100644 (file)
 \r
 - 0.7 | 0.8: The stomach gurgle sound duration does not match the pitch properly\r
 \r
-- 0.7 | 0.8 BUG: Names still show for eaten players.\r
+- 0.8: Maybe shownames can work for neighboring prey?\r
 \r
-- 0.8: Make menu song depend on menu skin?\r
+- 0.8: Make menu song depend on the menu skin?\r
 \r
 - 0.7 | 0.8: Always play the eating animations when the fire button is down? OR play an error sound saying "there is nothing to vore"\r
 \r