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 flying enemies fall damage #2431

Merged

Conversation

petchema
Copy link
Collaborator

Flying enemies hitting ground (recoil, under paralysis,...) were taking fall damage relative to their spawn location, because their lastGroundedY was never updated.

This can be fixed several ways, in this patch I extend lastGroundedY to flying enemies by updating it as long as flyingFalls is false; It could be renamed say lastAltitudeControlY, the last value of Y when the enemy had control over its altitude.

Forums: https://forums.dfworkshop.net/viewtopic.php?t=5874

Flying enemies hitting ground (recoil, under paralysis,...) were taking
fall damage relative to their spawn location, because their lastGroundedY
was never updated.

This can be fixed several ways, in this patch I extend lastGroundedY to flying
enemies by updating it as long as flyingFalls is false; It could be renamed
say lastAltitudeControlY, the last value of Y when the enemy had control over
its altitude.

Forums: https://forums.dfworkshop.net/viewtopic.php?t=5874
@petchema petchema added the bug label Sep 18, 2022
@Interkarma
Copy link
Owner

Thank you for fix @petchema!

@Interkarma Interkarma merged commit e3c2479 into Interkarma:master Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants