Skip to content

Commit

Permalink
Make scaling apply to waypoints as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Wide-Cat committed Oct 25, 2024
1 parent eacedeb commit 7a684a2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void onRender2D(Render2DEvent event) {

// Continue if this waypoint should not be rendered
if (dist > waypoint.maxVisible.get()) continue;
if (!NametagUtils.to2D(pos, 1)) continue;
if (!NametagUtils.to2D(pos, waypoint.scale.get() - 0.2)) continue;

// Calculate alpha and distance to center of the screen
double distToCenter = pos.distance(center);
Expand All @@ -119,7 +119,6 @@ private void onRender2D(Render2DEvent event) {
}

// Render
NametagUtils.scale = waypoint.scale.get() - 0.2;
NametagUtils.begin(pos);

// Render icon
Expand All @@ -129,7 +128,7 @@ private void onRender2D(Render2DEvent event) {
if (distToCenter <= textRenderDist) {
// Setup text rendering
int preTextA = TEXT.a;
TEXT.a *= a;
TEXT.a *= (int) a;
text.begin();

// Render name
Expand Down

0 comments on commit 7a684a2

Please sign in to comment.