tec::ClientGameStateQueue

#include <client-game-state-queue.hpp>

Inherits from tec::EventQueue< EntityCreated >, tec::EventQueue< EntityDestroyed >, tec::EventQueue< NewGameStateEvent >

Public Functions

Name
ClientGameStateQueue(ServerStats & s)
void Interpolate(const double delta_time)
void QueueServerState(GameState && new_state)
void UpdatePredictions(GameState & new_state)
Explicitly update the current prediction.
void CheckPredictionResult(GameState & new_state)
void ProcessEventQueue()
void SetClientID(eid _client_id)
void SetCommandID(state_id_t _command_id)
virtual void On(eid , std::shared_ptr< EntityCreated > data) override
virtual void On(eid entity_id, std::shared_ptr< EntityDestroyed > data) override
virtual void On(eid , std::shared_ptr< NewGameStateEvent > data) override
GameState & GetInterpolatedState()
GameState & GetBaseState()
void SetBaseState(GameState && new_state)
GameState * GetGameState(int offset)

Additional inherited members

Public Functions inherited from tec::EventQueue< EntityCreated >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< EntityCreated >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< EntityDestroyed >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< EntityDestroyed >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions inherited from tec::EventQueue< NewGameStateEvent >

Name
EventQueue()
EventQueue(eid entity_id)
virtual ~EventQueue()
void QueueEvent(Event< T > && e)

Protected Attributes inherited from tec::EventQueue< NewGameStateEvent >

Name
Queue< Event< T > > * read_event_queue
std::atomic< Queue< Event< T > > * > write_event_queue

Public Functions Documentation

function ClientGameStateQueue

ClientGameStateQueue(
    ServerStats & s
)

function Interpolate

void Interpolate(
    const double delta_time
)

function QueueServerState

void QueueServerState(
    GameState && new_state
)

function UpdatePredictions

void UpdatePredictions(
    GameState & new_state
)

Explicitly update the current prediction.

function CheckPredictionResult

void CheckPredictionResult(
    GameState & new_state
)

function ProcessEventQueue

void ProcessEventQueue()

function SetClientID

inline void SetClientID(
    eid _client_id
)

function SetCommandID

inline void SetCommandID(
    state_id_t _command_id
)

function On

virtual void On(
    eid ,
    std::shared_ptr< EntityCreated > data
) override

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid entity_id,
    std::shared_ptr< EntityDestroyed > data
) override

Reimplements: tec::EventQueue::On

function On

virtual void On(
    eid ,
    std::shared_ptr< NewGameStateEvent > data
) override

Reimplements: tec::EventQueue::On

function GetInterpolatedState

inline GameState & GetInterpolatedState()

function GetBaseState

inline GameState & GetBaseState()

function SetBaseState

inline void SetBaseState(
    GameState && new_state
)

function GetGameState

inline GameState * GetGameState(
    int offset
)

Updated on 2022-07-24 at 19:27:35 +0000