Skip to content

Commit

Permalink
fix 1 sync rate failing
Browse files Browse the repository at this point in the history
  • Loading branch information
bgkillas committed Jan 17, 2025
1 parent afc42ea commit 20037f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ewext/src/modules/entity_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ impl Module for EntitySync {

self.local_diff_model.update_pending_authority()?;

if frame_num % ctx.sync_rate == 0 {
if ctx.sync_rate == 1 || frame_num % ctx.sync_rate == 0 {
self.local_diff_model
.update_tracked_entities(ctx)
.wrap_err("Failed to update locally tracked entities")?;
Expand All @@ -266,7 +266,7 @@ impl Module for EntitySync {
)?;
}
Arc::make_mut(&mut self.pending_fired_projectiles).clear();
} else if frame_num % ctx.sync_rate == 1 {
} else if ctx.sync_rate == 1 || frame_num % ctx.sync_rate == 1 {
for (owner, remote_model) in &mut self.remote_models {
remote_model
.apply_entities(ctx)
Expand Down Expand Up @@ -360,4 +360,4 @@ fn send_remotedes(
message: RemoteMessage::RemoteDes(remote_des),
})?;
Ok(())
}
}

0 comments on commit 20037f2

Please sign in to comment.