| FSimulationTickState
|
Module |
|
Header |
/Engine/Plugins/Runtime/NetworkPrediction/Source/NetworkPrediction/Public/NetworkedSimulationModelTick.h |
Include |
#include "NetworkedSimulationModelTick.h" |
struct FSimulationTickState
FSimulationTickState: Holds active state for simulation ticking. We track two things: frames and time.
PendingFrame is the next frame we will process: the input/sync/aux state @ PendingFrame will be run through ::SimulationTick and produce the next frame's (PendingFrame+1) Sync and possibly Aux state (if it changes). "Out of band" modifications to the sync/aux state should happen to PendingFrame (e.g, before it is processed. Once a frame has been processed, we won't run it through ::SimulationTick again!).
MaxAllowedFrame is a frame based limiter on simulation updates. This must be incremented to allow the simulation to advance.
Time is also tracked. We keep running total for how much the sim has advanced and how much it is allowed to advance. There is also a historic buffer of simulation time in SimulationTimeBuffer.
Consider that Frames are essentially client dependent and gaps can happen due to packet loss, etc. Time will always be continuous though.
Name | Description | ||
---|---|---|---|
|
bUpdateInProgress |
||
|
MaxAllowedFrame |
||
|
PendingFrame |
||
|
SimulationTimeBuffer |
Historic tracking of simulation time. This allows us to timestamp sync data as its produced. |
|
|
TotalAllowedSimulationTime |
||
|
TotalProcessedSimulationTime |
Name | Description | ||
---|---|---|---|
|
FNetworkSimT... |
GetRemainingAllowedSimulationTime() |
How much granted simulation time is left to process. |
|
FNetworkSimT... |
GetTotalAllowedSimulationTime() |
|
|
FNetworkSimT... |
GetTotalProcessedSimulationTime() |
|
|
IncrementTotalProcessedSimulationTime ( |
||
|
SetTotalProcessedSimulationTime ( |