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

[MIRROR] Fix modsuit pathfinder module / JPS changes #2431

Merged
merged 1 commit into from
Mar 17, 2024

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Nova: NovaSector/NovaSector#1461
Original PR: tgstation/tgstation#81983

About The Pull Request

The Pathfinder module sucks cock because it doesn't work. And the reasons it doesn't work are as follows:

  1. It uses the default JPS pathfinding datum, which has a hard distance limit of 30, instead of the intended 200.
  2. JPS pathfinding as a whole will fail if you encounter more than 3 doors. This is because every door wastes about 5 movement opportunities, and the default pathfinder only has a limit of 20 before it considers the entire pathfinding attempt moot and bails out.

Here's how I fixed it:

  1. Created a new jps child that has a range of MOD_AI_RANGE
  2. Instead of counting all failures during the entire pathfinding attempt, it will only consider consecutive failures. Every successful move will reset the pathfinding failure count. This should make JPS pathfinding more reliable overall?

Changelog

🆑 Kapu1178
fix: Modsuit Pathfinder module is significantly better at finding it's destination.
/:cl:

* Fix modsuit pathfinder module / JPS changes (#81983)

## About The Pull Request
The Pathfinder module sucks cock because it doesn't work. And the
reasons it doesn't work are as follows:
1. It uses the default JPS pathfinding datum, which has a hard distance
limit of 30, instead of the intended 200.
2. JPS pathfinding as a whole will fail if you encounter more than 3
doors. This is because every door wastes about 5 movement opportunities,
and the default pathfinder only has a limit of 20 before it considers
the entire pathfinding attempt moot and bails out.

Here's how I fixed it:
1. Created a new jps child that has a range of MOD_AI_RANGE
2. Instead of counting all failures during the entire pathfinding
attempt, it will only consider consecutive failures. Every successful
move will reset the pathfinding failure count. This should make JPS
pathfinding more reliable overall?


## Changelog
:cl:
fix: Modsuit Pathfinder module is significantly better at finding it's
destination.
/:cl:

* Fix modsuit pathfinder module / JPS changes

---------

Co-authored-by: Kapu1178 <[email protected]>
@ReezeBL ReezeBL merged commit e14a4f5 into master Mar 17, 2024
24 checks passed
@ReezeBL ReezeBL deleted the upstream-mirror-1461 branch March 17, 2024 00:15
AnywayFarus added a commit that referenced this pull request Mar 17, 2024
Iajret pushed a commit that referenced this pull request May 11, 2024
…hortens heating time (#2431)

* sdwedw

* why did i make this so high??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants