mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
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:
commit
9f0ca486f7
@ -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
|
/// Distance at which nametags are visible for group members
|
||||||
const NAMETAG_GROUP_RANGE: f32 = 1000.0;
|
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
|
/// Distance at which nametags are visible
|
||||||
const NAMETAG_RANGE: f32 = 40.0;
|
const NAMETAG_RANGE: f32 = 40.0;
|
||||||
/// Time nametags stay visible after doing damage even if they are out of range
|
/// Time nametags stay visible after doing damage even if they are out of range
|
||||||
@ -1572,8 +1574,10 @@ impl Hud {
|
|||||||
|| in_group
|
|| in_group
|
||||||
|| is_merchant)
|
|| is_merchant)
|
||||||
&& dist_sqr
|
&& dist_sqr
|
||||||
< (if in_group || is_merchant {
|
< (if in_group {
|
||||||
NAMETAG_GROUP_RANGE
|
NAMETAG_GROUP_RANGE
|
||||||
|
} else if is_merchant {
|
||||||
|
NAMETAG_MERCHANT_RANGE
|
||||||
} else if hpfl
|
} else if hpfl
|
||||||
.time_since_last_dmg_by_me
|
.time_since_last_dmg_by_me
|
||||||
.map_or(false, |t| t < NAMETAG_DMG_TIME)
|
.map_or(false, |t| t < NAMETAG_DMG_TIME)
|
||||||
|
Loading…
Reference in New Issue
Block a user