Skip to content

Commit

Permalink
Ensure CharacterRenderer is not updating textures every single frame
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Apr 27, 2022
1 parent aafaa13 commit 512ed1a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions EndlessClient/Rendering/Character/CharacterRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,12 @@ private void SetGridCoordinatePosition()

private void SetScreenCoordinates(int xPosition, int yPosition)
{
// size of standing still skin texture
DrawArea = new Rectangle(xPosition, yPosition, 18, 58);
_textureUpdateRequired = true;
if (DrawArea.X != xPosition || DrawArea.Y != yPosition)
{
// size of standing still skin texture
DrawArea = new Rectangle(xPosition, yPosition, 18, 58);
_textureUpdateRequired = true;
}
}

private int GetMainCharacterOffsetX()
Expand Down

0 comments on commit 512ed1a

Please sign in to comment.