lucaspoffo / renet

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

Time drift on update #157

Open UkoeHB opened 3 months ago

UkoeHB commented 3 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.