Skip to content

fix: Fix a bug where NetworkTime initialized with wrong tick #1561

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

Closed
wants to merge 7 commits into from

Conversation

LukeStampfli
Copy link
Contributor

@LukeStampfli LukeStampfli commented Jan 4, 2022

Due to floating point math imprecision NetworkTime was sometimes initialized with a different tick value than the one passed from the constructor. Fixes #1495

MTT-2063

PR Checklist

  • Have you added a backport label (if needed)? For example, the type:backport-release-* label. After you backport the PR, the label changes to stat:backported-release-*.
  • Have you updated the changelog? Each package has a CHANGELOG.md file.
  • Have you updated or added the documentation for your PR? When you add a new feature, change a property name, or change the behavior of a feature, it's best practice to include related documentation changes in the same PR or a link to the documenation repo PR if this is a manual update.

Changelog

com.unity.netcode.gameobjects

  • Fixed: Fixed a bug where when constructing a NetworkTime from a tick the resulting instance sometimes had a different tick value due to floating point math imprecision.

Testing and Documentation

  • Includes unit tests for NetworkTime and NetworkTickSystem.
  • No documentation changes or additions were necessary.

…ng tick value due to floating point precision.
@0xFA11 0xFA11 self-requested a review January 6, 2022 17:11
@LukeStampfli
Copy link
Contributor Author

closing this @NoelStephensUnity has found a much better fix.

@0xFA11
Copy link
Contributor

0xFA11 commented Jan 24, 2022

#1614

@ashwinimurt
Copy link
Contributor

Removing Label backport-release-1.0.0 since the PR is closed.

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.

Tick System - duplication/skipping tick value for Tick event
3 participants