Skip to content

Commit

Permalink
Fix render position of other characters
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed May 2, 2023
1 parent 1df8623 commit 6475bb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EndlessClient/Rendering/Character/CharacterRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ private void DrawToRenderTarget()
_sb.Draw(_outline, DrawArea.WithPosition(new Vector2(DrawArea.X, DrawArea.Y + DrawArea.Height)).WithSize(DrawArea.Width, 1), Color.Black);
_sb.Draw(_outline, DrawArea.WithSize(1, DrawArea.Height), Color.Black);

_sb.Draw(_outline, DrawArea, Color.FromNonPremultiplied(255, 0, 0, 64));
}
_sb.Draw(_outline, DrawArea, Color.FromNonPremultiplied(255, 0, 0, 64));
}

_sb.End();
GraphicsDevice.SetRenderTarget(null);
Expand All @@ -327,7 +327,7 @@ private Color GetAlphaColor()
private void SetGridCoordinatePosition()
{
var centerX = _clientWindowSizeRepository.Resizable ? _clientWindowSizeRepository.Width / 2 - 8 : 310;
var centerY = _clientWindowSizeRepository.Resizable ? _clientWindowSizeRepository.Height * 45 / 100 : 104;
var centerY = _clientWindowSizeRepository.Resizable ? _clientWindowSizeRepository.Height * 45 / 100 + 16 : 104;

var screenX = _renderOffsetCalculator.CalculateOffsetX(_character.RenderProperties) + centerX - GetMainCharacterOffsetX();
var screenY = _renderOffsetCalculator.CalculateOffsetY(_character.RenderProperties) + centerY - GetMainCharacterOffsetY();
Expand Down

0 comments on commit 6475bb7

Please sign in to comment.