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 badguys not climbing certain slopes #2925

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

Conversation

tobbi
Copy link
Member

@tobbi tobbi commented Apr 27, 2024

Fixes #761

I don't know if this introduces other bugs, so please test this thoroughly before merging.

@Rusty-Box
Copy link
Member

I does kinda work. Only problem is that smart enemies go up all slopes but refuseto go down >=45° slopes.

@MatusGuy
Copy link
Member

I does kinda work. Only problem is that smart enemies go up all slopes but refuseto go down >=45° slopes.

This is unrelated and planned to be fixed in #2812

@MatusGuy MatusGuy added category:code status:needs-review Work needs to be reviewed by other people type:bugfix Pull Requests that fix bugs. labels Apr 28, 2024
@tobbi tobbi requested a review from Vankata453 April 29, 2024 22:34
Copy link
Member

@Vankata453 Vankata453 left a comment

Choose a reason for hiding this comment

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

Tested this and it works great! Not sure how it could introduce other bugs really - only affects the check of turning around, which is what is being fixed.

Comment on lines 198 to +199
if ((hit.left && (m_dir == Direction::LEFT)) || (hit.right && (m_dir == Direction::RIGHT))) {
turn_around();
if(hit.slope_normal.x == 0.0f)
Copy link
Member

Choose a reason for hiding this comment

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

Can you append this check to the if above (preferably at the beginning, so the hit.left and hit.right checks are done afterwards)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:code status:needs-review Work needs to be reviewed by other people type:bugfix Pull Requests that fix bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Badguys turn away from slopes >22.5°
4 participants