Fixed nametag logic bug

This commit is contained in:
Joshua Barretto 2022-01-07 21:54:14 +00:00
parent e12390b08b
commit bc7c942bc9

View File

@ -1830,13 +1830,12 @@ impl Hud {
// entity has been damaged, is targeted/selected, or is in your group
// Note: even if this passes the healthbar can be hidden in some cases if it
// is at maximum
let display_overhead_info =
(info.target_entity.map_or(false, |e| e == entity)
let display_overhead_info = !is_me
&& (info.target_entity.map_or(false, |e| e == entity)
|| info.selected_entity.map_or(false, |s| s.0 == entity)
|| health.map_or(true, overhead::should_show_healthbar)
|| in_group
|| is_merchant
|| !is_me)
|| is_merchant)
&& dist_sqr
< (if in_group {
NAMETAG_GROUP_RANGE