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

[Improvement] Flee Overhaul #4407

Merged
merged 7 commits into from
Jul 30, 2024
Merged

[Improvement] Flee Overhaul #4407

merged 7 commits into from
Jul 30, 2024

Conversation

fryguy503
Copy link
Contributor

Description

There was a number of issues with the current flee code that caused some heartburn. I merged the TAKP logic with our rule and extended flee checking logic to create this.

  • Mobs will properly check Race and Faction of nearby mobs
  • Mobs will check flee status on HP change (damage or heal/regen) to determine if they should continue to flee (Issue on current code).
  • Mobs will appropriately slowdown/speedup when their HP drops/increases.
  • Mob pathing is greatly increased to not push them outside of mesh/player accessible areas.

Adds #fleeinfo for mob flee status and potential

Credits go to https://github.com/eqmacemu/server for a very large portion of this code.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have tested my changes
  • I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
  • I own the changes of my code and take responsibility for the potential issues that occur

@fryguy503 fryguy503 requested a review from noudess July 14, 2024 00:26
zone/aggro.cpp Outdated Show resolved Hide resolved
@fryguy503
Copy link
Contributor Author

This needs full testing before being merged. 1 other server reported issues with fleeing causing mobs to pop underground, but I am not sure how much that was existing issues with mesh and z axis and how much may have been caused by this PR.

@Akkadius Akkadius requested a review from KimLS July 23, 2024 01:50
@fryguy503
Copy link
Contributor Author

Recent adjustment helps with mobs following furthest Z mesh when multiple Z planes of near Z mesh are on top of each other.

KimLS
KimLS previously requested changes Jul 23, 2024
Copy link
Member

@KimLS KimLS left a comment

Choose a reason for hiding this comment

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

Overall, I don't see a ton wrong with this. I marked a few spots that potentially have minor changes to make but even if we didn't make them it would be fine.

zone/attack.cpp Outdated Show resolved Hide resolved
zone/fearpath.cpp Outdated Show resolved Hide resolved
@catapultam-habeo
Copy link
Contributor

This has been working much better since latest changes

@joligario joligario requested review from KimLS and removed request for noudess July 30, 2024 21:35
@fryguy503 fryguy503 merged commit 2ef959c into master Jul 30, 2024
2 checks passed
@fryguy503 fryguy503 deleted the trust/flee_updates branch July 30, 2024 22:27
@joligario joligario mentioned this pull request Jul 30, 2024
This pull request was closed.
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.

6 participants