Skip to content

Commit

Permalink
Fix offsets for male armor/boots when walking
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Jan 28, 2021
1 parent f2eaafd commit cb19f7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private Vector2 GetOffsets(Vector2 parentCharacterSize)

// todo: floor sitting offsets
if (_renderProperties.SitState == SitState.Standing)
resY -= _renderProperties.IsActing(CharacterActionState.Walking) ? 4 : 3;
resY -= (_renderProperties.IsActing(CharacterActionState.Walking) ? 4 : 3) + _renderProperties.Gender;
else
resY += _renderProperties.IsFacing(EODirection.Left, EODirection.Up) ? 2 : 0;

Expand Down
4 changes: 2 additions & 2 deletions EndlessClient/Rendering/CharacterProperties/BootsRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public override void Render(SpriteBatch spriteBatch, Rectangle parentCharacterDr
private Vector2 GetOffsets(Rectangle parentCharacterDrawArea)
{
var resX = -(float)Math.Floor(Math.Abs((float)_bootsSheet.SourceRectangle.Width - parentCharacterDrawArea.Width) / 2);
var resY = (int)Math.Floor(parentCharacterDrawArea.Height / 3f) * 2 - 1;
var resY = (int)Math.Floor(parentCharacterDrawArea.Height / 3f) * 2 - 1 - _renderProperties.Gender;

if (_renderProperties.IsActing(CharacterActionState.Walking))
{
resY -= 1;// * factor;
resY -= 1;

if (_renderProperties.RenderWalkFrame == 2)
resY -= 1;
Expand Down

0 comments on commit cb19f7e

Please sign in to comment.