Skip to content

Commit

Permalink
Update mod.rs to have ping divided by 2 (#15)
Browse files Browse the repository at this point in the history
Addresses an issue mentioned in #14. 

Authored by: ValorZard
Signed off by: james7132
  • Loading branch information
ValorZard authored Jun 17, 2021
1 parent d45f76f commit 6499fc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backroll/src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ impl<T: Config> Peer<T> {
// last frame they gave us plus some delta for the one-way packet
// trip time.
let remote_frame = self.input_decoder.last_decoded_frame()
+ (stats.round_trip_time.as_secs() * TARGET_TPS) as i32;
+ ((stats.round_trip_time.as_secs() / 2) * TARGET_TPS) as i32;

// Our frame advantage is how many frames *behind* the other guy
// we are. Counter-intuative, I know. It's an advantage because
Expand Down

0 comments on commit 6499fc1

Please sign in to comment.