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 grenade splash damage #409

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Fix grenade splash damage #409

merged 1 commit into from
Jun 14, 2024

Conversation

tra
Copy link
Contributor

@tra tra commented Jun 14, 2024

This fixes 2 basic things:

  1. there was a bug in how the length of the ray was scaled for high-FPS that could cause the grenade to explode closer to the launcher that it should be.

  2. the ray test was modified to extend the ray by sqrt(2)*grenadeRadius. This allows the ray test to pass for grenades that are "kissing" an object right at the end of a frame. For higher frame rates this occurs more often so this fix makes it so that all frame rates behave the same and don't have this "kissing" issue.

This fixes 2 basic things:

1. there was a bug in how the length of the ray was scaled for high-FPS that
could cause the grenade to explode closer to the launcher that it should be.

2. the ray test was modified to extend the ray by sqrt(2)*grenadeRadius.  This
allows the ray test to pass for grenades that are "kissing" an object right at
the end of a frame.  For higher frame rates this occurs more often so this fix
makes it so that all frame rates behave the same and don't have this "kissing"
issue.
@tra tra merged commit 7aa2606 into main Jun 14, 2024
3 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.

1 participant