TRepController_Empty

Empty RepController: zero functionality, just stubbed out functions and using definitions for convenience.

Windows
MacOS
Linux

References

Module

NetworkPrediction

Header

/Engine/Plugins/Runtime/NetworkPrediction/Source/NetworkPrediction/Public/NetworkedSimulationModelRepControllers.h

Include

#include "NetworkedSimulationModelRepControllers.h"

Syntax

template<typename Model>
struct TRepController_Empty

Remarks

Replication Controllers

The RepControllers are the pieces of the TNetworkedSimulationModel that make up the role-specific functionality (Server, Autonomous Client, and Simulated Client). Mainly they NetSerialize, Reconcile, and have Pre/Post sim tick functions. The TNetworkedSimulationModel is still the core piece that ticks the sim, but the Replicators do everything else in a role-specific way.

Functions

Name Description

Public function Const

int32

 

GetProxyDirtyCount

Used for client shadowstate compares. Should just call GetDirtyCount() on the buffer you are replicating.

Public function

void

 

NetSerialize

(
    const FNetSerializeParams& P,
    TNetworkSimBufferContainer< Model >...,
    const TSimulationTicker< TTickSetti...
)

NetSerialize: just serialize the network data. Don't run simulation steps. Every replicator will be NetSerialized before moving on to Reconcile phase.

Public function

void

 

PostSimTick

(
    TDriver* Driver,
    const TNetworkSimBufferContainer< M...,
    const TSimulationTicker< TTickSetti...,
    const FNetSimTickParameters& TickP...
)

Called after input processing. Should finalize the frame and do any smoothing/interpolation. This function is not allowed to modify the buffers or tick state, or even call the simulation/Update function.

Public function

void

 

PreSimTick

(
    TDriver* Driver,
    TNetworkSimBufferContainer< Model >...,
    TSimulationTicker< TTickSettings > ...,
    const FNetSimTickParameters& TickP...
)

Called prior to input processing. This function must update Ticker to allow simulation time (from TickParameters) and to possibly get new input.

Public function

void

 

Reconcile

(
    TSimulation* Sim,
    TDriver* Driver,
    TNetworkSimBufferContainer< Model >...,
    TSimulationTicker< TTickSettings > ...
)

Reconcile: called after everyone has NetSerialized. "Get right with the server": this function is about reconciling what the server told you vs what you have extrapolated or forward predicted locally.

Typedefs

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss