Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ fn cleanup_acks(
}

fn receive_acks(
change_tick: SystemChangeTick,
mut messages: ResMut<ServerMessages>,
mut pools: ResMut<ClientPools>,
mut clients: Query<&mut ClientTicks>,
Expand All @@ -263,9 +262,7 @@ fn receive_acks(
"messages from client `{client}` should have been removed on disconnect"
)
});
if let Some(mut entities) =
ticks.ack_mutate_message(client, change_tick.this_run(), mutate_index)
{
if let Some(mut entities) = ticks.ack_mutate_message(client, mutate_index) {
entities.clear();
pools.entities.push(entities);
}
Expand Down
3 changes: 1 addition & 2 deletions src/shared/replication/client_ticks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ impl ClientTicks {
pub(crate) fn ack_mutate_message(
&mut self,
client: Entity,
this_run: Tick,
mutate_index: MutateIndex,
) -> Option<Vec<Entity>> {
let Some(mutate_info) = self.mutations.remove(&mutate_index) else {
Expand All @@ -115,7 +114,7 @@ impl ClientTicks {

// Received tick could be outdated because we bump it
// if we detect any insertion on the entity in `collect_changes`.
if !system_tick.is_newer_than(mutate_info.system_tick, this_run) {
if *server_tick < mutate_info.server_tick {
*system_tick = mutate_info.system_tick;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is system_tick still needed?

Copy link
Contributor Author

@Shatur Shatur Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we use it for change detection. But since after #553 we now store RepliconTick for prioritization for each entity, we can just use it to check if the entity was already acked.

*server_tick = mutate_info.server_tick;
}
Expand Down