pond3r / ggpo

Good Game, Peace Out Rollback Network SDK
MIT License
3.11k stars 360 forks source link

Fix local frame advantage estimation #64

Closed ctmatthews closed 10 months ago

ctmatthews commented 2 years ago

UdpProtocol::_local_frame_advantage estimation was previously using the full packet round trip time instead of an estimation of the one-way packet trip time, so I edited the line of code to match the behavior described in the comment on the line above. This theoretically wasn't causing any issues in the first place, as all players would have similar errors in their local estimations and they would cancel each other out.