change to permanent visibility of ship labels
This commit is contained in:
parent
e050d7d0ec
commit
bee3545196
@ -757,12 +757,13 @@ namespace ZL
|
|||||||
Vector3f shipWorld = st.position;
|
Vector3f shipWorld = st.position;
|
||||||
|
|
||||||
float distSq = (Environment::shipState.position - shipWorld).squaredNorm();
|
float distSq = (Environment::shipState.position - shipWorld).squaredNorm();
|
||||||
if (distSq > MAX_DIST_SQ)
|
/*if (distSq > MAX_DIST_SQ) // дальность прорисовки никнейма
|
||||||
continue;
|
continue;*/
|
||||||
float dist = sqrt(distSq);
|
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)
|
if (alpha < 0.01f)
|
||||||
continue;
|
continue; */
|
||||||
Vector3f labelWorld = shipWorld + Vector3f{ 0.f, -4.f, 0.f }; // регулировка высоты
|
Vector3f labelWorld = shipWorld + Vector3f{ 0.f, -4.f, 0.f }; // регулировка высоты
|
||||||
float sx, sy, depth;
|
float sx, sy, depth;
|
||||||
if (!worldToScreen(labelWorld, sx, sy, depth))
|
if (!worldToScreen(labelWorld, sx, sy, depth))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user