spectator catch-up when too far behind
gschup opened this issue · comments
Currently, the spectator has a queue of received host inputs it works through. When that queue overflows, the SpectatorSession returns an Error, as we cannot hold all received inputs anymore.
It would be useful to let the spectator run faster if that queue is close to being full.
The simplest solution is to just request two GGRSRequest::AdvanceFrame
if the spectator is too far behind.
Each spectator session now has a last_recv_frame
that is updated with each received input. From this, it is easy to compute how many frames a spectator is behind.