Fix nametags showing on dead players (maybe)

Former-commit-id: 94548e131ee7c94fc5546fa7410fc9694d1db68e
This commit is contained in:
timokoesters 2019-05-26 00:34:24 +02:00
parent 148c015b38
commit a18a8e0d15

View File

@ -305,10 +305,10 @@ impl Hud {
let mut name_id_walker = self.ids.name_tags.walk();
let mut health_id_walker = self.ids.health_bars.walk();
let mut health_back_id_walker = self.ids.health_bar_backs.walk();
for (pos, name) in (&entities, &pos, &actor, player.maybe())
for (pos, name) in (&entities, &pos, &actor, &stats, player.maybe())
.join()
.filter(|(entity, _, _, _)| *entity != me)
.map(|(entity, pos, actor, player)| match actor {
.filter(|(entity, _, _, stats, _)| *entity != me && !stats.is_dead())
.map(|(entity, pos, actor, _, player)| match actor {
comp::Actor::Character {
name: char_name, ..
} => {