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

Bypass move_effect check if force true when moving vertically #61641

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

Fris0uman
Copy link
Contributor

@Fris0uman Fris0uman commented Oct 12, 2022

Summary

None

Purpose of change

Fixes #60896

Describe the solution

Falling while downed would get you in an infinite loop because the downed effect never clears and thus you never get past the move_effect check so you never actually move

Describe alternatives you've considered

Bypass the check when force == true which is the case when falling and make sense, if we're forcing the movement we don't care about move effects

Testing

Teleport in the sky one > fall and get downed
Teleport a second time
> before patch get into infinite loop
> after patch get to the ground no issue

Additional context

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Oct 12, 2022
@kevingranade
Copy link
Member

I think this makes the situation better, but looking over what happens in move_effect, we need a better solution for canceling effects when they no longer make sense.

Maybe pass an enum saying what kind of movement it is into move_effect() so it can decide whether it should cancel it.

@kevingranade kevingranade merged commit cd5924e into CleverRaven:master Oct 12, 2022
@Fris0uman Fris0uman deleted the fall branch October 12, 2022 16:52
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When flung from a roof fall damage iterates indefitinely
2 participants