lucaspoffo / renet

Server/Client network library for multiplayer games with authentication and connection management made with Rust
Apache License 2.0
685 stars 68 forks source link

Time drift on update #157

Open UkoeHB opened 7 months ago

UkoeHB commented 7 months ago

RenetClient increments its current_time by adding the duration of the last tick. Since Duration doesn't have infinite precision, this causes current_time to drift. For long-running servers and clients this may become noticeable.

The time should instead be set equal to the actual current time.