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

Split RepliconTick from resource #254

Merged
merged 4 commits into from
May 11, 2024
Merged

Split RepliconTick from resource #254

merged 4 commits into from
May 11, 2024

Conversation

Shatur
Copy link
Contributor

@Shatur Shatur commented May 9, 2024

Third-party rollback crates need decrement operations. This is why they using their own ticks and convert them back and forth. It's not convenient.

Just providing decrement operations to resource would be weird since user should never decrement it. This is why I made RepliconTick into a simple struct and use a dedicated resource called ServerTick for tracking current simulation tick.

See also bevyengine/bevy#13306

Third-party rollback crates need decrement operations. This is why they
using their own ticks and convert them back and forth. It's not
convenient.

Just providing decrement operations to resource would be weird since
user should never decrement it. This is why I made `RepliconTick` into a
simple struct and use a dedicated resource called `ServerTick` for
tracking current simulation tick.

See also bevyengine/bevy#13306
Copy link

codecov bot commented May 9, 2024

Codecov Report

Attention: Patch coverage is 75.60976% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 91.19%. Comparing base (9ce7b8a) to head (78546c4).

Files Patch % Lines
src/core/replicon_tick.rs 61.90% 8 Missing ⚠️
src/network_event/server_event.rs 66.66% 1 Missing ⚠️
src/server.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #254      +/-   ##
==========================================
- Coverage   91.53%   91.19%   -0.34%     
==========================================
  Files          36       37       +1     
  Lines        2067     2079      +12     
==========================================
+ Hits         1892     1896       +4     
- Misses        175      183       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Shatur Shatur marked this pull request as ready for review May 10, 2024 22:59
@Shatur Shatur requested a review from UkoeHB May 10, 2024 22:59
@Shatur Shatur merged commit 7b65416 into master May 11, 2024
5 checks passed
@Shatur Shatur deleted the ticks branch May 11, 2024 09:15
Shatur added a commit that referenced this pull request May 15, 2024
Shatur added a commit that referenced this pull request May 15, 2024
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