Merge branch 'aweinstock/small-fixes' into 'master'

Distinguish NAMETAG_MERCHANT_RANGE from NAMETAG_GROUP_RANGE.

See merge request veloren/veloren!2277
This commit is contained in:
Monty Marz 2021-05-09 09:58:44 +00:00
commit 9f0ca486f7

View File

@ -177,6 +177,8 @@ const MENU_BG: Color = Color::Rgba(0.1, 0.12, 0.12, 1.0);
/// Distance at which nametags are visible for group members
const NAMETAG_GROUP_RANGE: f32 = 1000.0;
/// Distance at which nametags are visible for merchants
const NAMETAG_MERCHANT_RANGE: f32 = 50.0;
/// Distance at which nametags are visible
const NAMETAG_RANGE: f32 = 40.0;
/// Time nametags stay visible after doing damage even if they are out of range
@ -1572,8 +1574,10 @@ impl Hud {
|| in_group
|| is_merchant)
&& dist_sqr
< (if in_group || is_merchant {
< (if in_group {
NAMETAG_GROUP_RANGE
} else if is_merchant {
NAMETAG_MERCHANT_RANGE
} else if hpfl
.time_since_last_dmg_by_me
.map_or(false, |t| t < NAMETAG_DMG_TIME)