Closed Shatur closed 6 months ago
Attention: Patch coverage is 93.33333%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 90.79%. Comparing base (
e128056
) to head (b3bb6cf
).
Files | Patch % | Lines |
---|---|---|
src/server/connected_clients/client_visibility.rs | 75.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Add test to document the bug?
We have a test for it, but it didn't trigger the bug because the check for new entities was tied to the visibility policy :)
Visibility was coupled with a check if a client was just connected. This resulted in a passed test that checks replication of previously spawned entities (it was running with
VisibilityPolicy::All
). But for all other policies the logic was incorrect and led to a crash with "entity should be present after adding component".I decoupled the logic. We now determine if the entity is new to a client by checking if it has a tick.
I thinking that we need to rename "change limit" into "init tick" because we use this terminology on client. But it will be a breaking change, so I will leave it for the next release.