From: MirceaKitsune Date: Thu, 15 Mar 2012 14:16:28 +0000 (+0200) Subject: Fix player names showing for prey X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d4e403726d135d607a78196ffcf3b57b7bacbbdd;p=voretournament%2Fvoretournament.git Fix player names showing for prey --- diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index 4a106a31..7006f429 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -688,6 +688,8 @@ void Ent_ReadEntCS() self.healthvalue = ReadShort(); if(sf & 16) self.armorvalue = ReadShort(); + if(sf & 32) + self.eaten = ReadByte(); entcs_receiver[self.sv_entnum] = self; self.entremove = Ent_RemoveEntCS; diff --git a/data/qcsrc/client/shownames.qc b/data/qcsrc/client/shownames.qc index f3edd282..eae0e54b 100644 --- a/data/qcsrc/client/shownames.qc +++ b/data/qcsrc/client/shownames.qc @@ -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); diff --git a/data/qcsrc/client/shownames.qh b/data/qcsrc/client/shownames.qh index 62aaae2b..b2d167d2 100644 --- a/data/qcsrc/client/shownames.qh +++ b/data/qcsrc/client/shownames.qh @@ -1,2 +1,3 @@ .float healthvalue; .float armorvalue; +.float eaten; diff --git a/data/qcsrc/server/ent_cs.qc b/data/qcsrc/server/ent_cs.qc index 0743388f..687e9d54 100644 --- a/data/qcsrc/server/ent_cs.qc +++ b/data/qcsrc/server/ent_cs.qc @@ -30,8 +30,6 @@ float entcs_customize() return FALSE; if(other == o) return FALSE; - if(o.stat_eaten) - return FALSE; return TRUE; } @@ -53,6 +51,8 @@ float entcs_send(entity to, float sf) WriteShort(MSG_ENTITY, self.health); if(sf & 16) WriteShort(MSG_ENTITY, self.armorvalue); + if(sf & 32) + WriteByte(MSG_ENTITY, self.stat_eaten); return TRUE; }; @@ -83,6 +83,11 @@ void entcs_think() self.armorvalue = o.armorvalue; self.SendFlags |= 16; } + if(o.stat_eaten != self.stat_eaten) + { + self.stat_eaten = o.stat_eaten; + self.SendFlags |= 32; + } }; entity attach_entcs() diff --git a/docs/Release notes.txt b/docs/Release notes.txt index a81a3e55..777d5d50 100644 --- a/docs/Release notes.txt +++ b/docs/Release notes.txt @@ -276,6 +276,8 @@ Bug fixes: - 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. +- Fix floating player names showing for prey, which was both wrong and caused overlapping. + Features: - 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. diff --git a/docs/TODO.txt b/docs/TODO.txt index 246c5367..83c21598 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -120,9 +120,9 @@ - 0.7 | 0.8: The stomach gurgle sound duration does not match the pitch properly -- 0.7 | 0.8 BUG: Names still show for eaten players. +- 0.8: Maybe shownames can work for neighboring prey? -- 0.8: Make menu song depend on menu skin? +- 0.8: Make menu song depend on the menu skin? - 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"