Skip to content

Commit

Permalink
Update character name label position when character sits based on sit…
Browse files Browse the repository at this point in the history
… state
  • Loading branch information
ethanmoffat committed May 4, 2023
1 parent ff35d27 commit 3dcc3ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EndlessClient/Rendering/Character/CharacterRenderer.cs
Expand Up @@ -342,7 +342,6 @@ private void SetScreenCoordinates(int xPosition, int yPosition)
// size of standing still skin texture
DrawArea = new Rectangle(xPosition, yPosition, 18, 58);
HorizontalCenter = xPosition + 9;
NameLabelY = DrawArea.Y - 12 - (int)(_nameLabel?.ActualHeight ?? 0);
_textureUpdateRequired = true;
}
}
Expand Down Expand Up @@ -395,6 +394,7 @@ private void UpdateNameLabel()

private Vector2 GetNameLabelPosition()
{
NameLabelY = DrawArea.Y - 12 - (int)(_nameLabel?.ActualHeight ?? 0) + ((int)Character.RenderProperties.SitState)*10;
return new Vector2(HorizontalCenter - (_nameLabel.ActualWidth / 2f), NameLabelY);
}

Expand Down

0 comments on commit 3dcc3ae

Please sign in to comment.