Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix monster turn to player #4756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ArturKnopik
Copy link
Contributor

@ArturKnopik ArturKnopik commented Jun 19, 2024

Pull Request Prelude

Changes Proposed

Fix monster turns to player direction:
fix bugs introduced in
#4674
#4648

How to test:

  1. Create monster Rat and Amazon
  2. Let monsters attacks player
  3. Wait till amazon reach max range
  4. Check if monsters are turned in player direction

Copy link
Contributor

@ramon-bernardo ramon-bernardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert these changes and change this will fix it 😏

// current
int32_t offsetx = pos.getOffsetX(attackedCreaturePos);
int32_t offsety = pos.getOffsetY(attackedCreaturePos);

// fixed
int32_t offsetx = attackedCreaturePos.getOffsetX(pos);
int32_t offsety = attackedCreaturePos.getOffsetY(pos);

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants