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 negative delta arguments backport to 3.x #52947

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

zmanuel
Copy link
Contributor

@zmanuel zmanuel commented Sep 22, 2021

Cherry pick of #35617

There have been a couple of variable renames in the main branch, so some manual re-adaptions were needed.

Three attack points, all after the regular calculations:
1. Prevent negative physics timestep counts. They could occur if
   physics_jtter_fix is changed at runtime.
2. idle_step is not allowed to go below 1/8th of the input step.
   That could happen on physics_jitter_fix changes or heavily
   fluctuating performance.
3. Prevent that the idle_step modification breaks the promise
   that Engine.get_physics_interpolation_fraction() is between
   0 and 1 by doing more physics steps than the base system wants.

Fixes godotengine#26887

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Cherry-Pick from 6be702b.
@zmanuel zmanuel requested a review from a team as a code owner September 22, 2021 20:02
@zmanuel zmanuel changed the title Fix negative delta arguments Fix negative delta arguments backport to 3.x Sep 22, 2021
@Calinou Calinou added this to the 3.4 milestone Sep 22, 2021
@akien-mga akien-mga merged commit 2ad1c85 into godotengine:3.x Sep 29, 2021
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants