From 59ae3e8e63f9030c715e43e53e06e0364c001905 Mon Sep 17 00:00:00 2001 From: hiker Date: Thu, 22 Jun 2017 17:39:56 +1000 Subject: [PATCH] Added documentation. --- src/network/rewind_queue.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/network/rewind_queue.cpp b/src/network/rewind_queue.cpp index b3e913257..84ae23f2e 100755 --- a/src/network/rewind_queue.cpp +++ b/src/network/rewind_queue.cpp @@ -26,7 +26,19 @@ #include -/** The constructor. +/** The RewindQueue stores one TimeStepInfo for each time step done. + * The TimeStepInfo stores all states and events to be used at the + * given timestep. + * All network events (i.e. new states or client events) are stored in a + * separate list m_network_events. At the very start of a new time step + * a new TimeStepInfo object is added. Then all network events that are + * supposed to happen between t and t+dt are added to this newly added + * TimeStep (see mergeNetworkData), and are then being executed. + * In case of a rewind the RewindQueue finds the last TimeStepInfo with + * a confirmed server state (undoing the events, see undoUntil). Then + * the state is restored from the TimeStepInfo object (see replayAllStates) + * then the rewind manager re-executes the time steps (using the events + * stored at each timestep). */ RewindQueue::RewindQueue() {