Skip to content

SERVER: Fixed fall damage formula incorrectly dealing max damage at all distances#138

Merged
MotoLegacy merged 1 commit into
nzp-team:mainfrom
awildergoose:main
Aug 28, 2025
Merged

SERVER: Fixed fall damage formula incorrectly dealing max damage at all distances#138
MotoLegacy merged 1 commit into
nzp-team:mainfrom
awildergoose:main

Conversation

@awildergoose
Copy link
Copy Markdown
Contributor

@awildergoose awildergoose commented Aug 20, 2025

Description of Changes


The fall damage formula previously always dealt the maximum damage of 98 due to the damage not being subtracted by 176 (the minimum fall damage distance)
This PR fixes that by using the height minus 176 when applying the damage formula.

Visual Sample


In the previous behavior, a fall from any height over 176 dealt 98 damage, but in the new behavior, the damage scales by height.

(look top-left showing the damage after falling)
Previous behavior:
https://github.com/user-attachments/assets/b9e61a07-1b4d-4af8-adb0-32e2a88cd95b
New behavior:
https://github.com/user-attachments/assets/a293498a-d8db-45d6-9226-d6c37b85884a

Checklist


  • I have thoroughly tested my changes to the best of my ability
  • I confirm I have not contributed anything that would impact Nazi Zombies: Portable's licensing and usage
  • This Pull Request fixes a critical issue that should be reviewed and merged as soon as possible

Copy link
Copy Markdown
Member

@MotoLegacy MotoLegacy left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up a bit. Note to myself to separate this into a separate function and draft a unit test.

@MotoLegacy MotoLegacy merged commit bea9215 into nzp-team:main Aug 28, 2025
2 checks passed
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.

2 participants