change to permanent visibility of ship labels

This commit is contained in:
vottozi 2026-02-02 13:48:28 +06:00
parent e050d7d0ec
commit bee3545196

View File

@ -757,12 +757,13 @@ namespace ZL
Vector3f shipWorld = st.position;
float distSq = (Environment::shipState.position - shipWorld).squaredNorm();
if (distSq > MAX_DIST_SQ)
continue;
/*if (distSq > MAX_DIST_SQ) // дальность прорисовки никнейма
continue;*/
float dist = sqrt(distSq);
float alpha = std::clamp(1.f - (dist - FADE_START) / FADE_RANGE, 0.f, 1.f);
float alpha = 1.0f; // постоянная видимость
/*float alpha = std::clamp(1.f - (dist - FADE_START) / FADE_RANGE, 0.f, 1.f); // дальность прорисовки никнейма
if (alpha < 0.01f)
continue;
continue; */
Vector3f labelWorld = shipWorld + Vector3f{ 0.f, -4.f, 0.f }; // регулировка высоты
float sx, sy, depth;
if (!worldToScreen(labelWorld, sx, sy, depth))