Implementation of CTurnManager for network clients.
More...
#include <NetClientTurnManager.h>
|
| CNetClientTurnManager (CSimulation2 &simulation, CNetClient &client, int clientId, IReplayLogger &replay) |
|
void | OnSimulationMessage (CSimulationMessage *msg) override |
| Called by networking code when a simulation message is received. More...
|
|
void | PostCommand (JS::HandleValue data) override |
| Called by simulation code, to add a new command to be distributed to all clients and executed soon. More...
|
|
void | OnDestroyConnection () |
| Notify the server that all commands are sent to prepare the connection for termination. More...
|
|
void | OnSyncError (u32 turn, const CStr &expectedHash, const std::vector< CSyncErrorMessage::S_m_PlayerNames > &playerNames) |
|
| CTurnManager (CSimulation2 &simulation, u32 defaultTurnLength, u32 commandDelay, int clientId, IReplayLogger &replay) |
| Construct for a given network session ID. More...
|
|
virtual | ~CTurnManager () |
|
void | ResetState (u32 newCurrentTurn, u32 newReadyTurn) |
|
void | SetPlayerID (int playerId) |
| Set the current user's player ID, which will be added into command messages. More...
|
|
bool | Update (float simFrameLength, size_t maxTurns) |
| Advance the simulation by a certain time. More...
|
|
bool | UpdateFastForward () |
| Advance the simulation by as much as possible. More...
|
|
void | Interpolate (float simFrameLength, float realFrameLength) |
| Advance the graphics by a certain time. More...
|
|
void | FinishedAllCommands (u32 turn, u32 turnLength) |
| Called when all commands for a given turn have been received. More...
|
|
void | EnableTimeWarpRecording (size_t numTurns) |
| Enables the recording of state snapshots every numTurns , which can be jumped back to via RewindTimeWarp(). More...
|
|
void | RewindTimeWarp () |
| Jumps back to the latest recorded state snapshot (if any). More...
|
|
void | QuickSave (JS::HandleValue GUIMetadata) |
|
void | QuickLoad () |
|
u32 | GetCurrentTurn () const |
|
u32 | GetPendingTurns () const |
|
Implementation of CTurnManager for network clients.
◆ CNetClientTurnManager()
◆ NONCOPYABLE()
◆ NotifyFinishedOwnCommands()
void CNetClientTurnManager::NotifyFinishedOwnCommands |
( |
u32 |
turn | ) |
|
|
overrideprivatevirtual |
Called when this client has finished sending all its commands scheduled for the given turn.
Implements CTurnManager.
◆ NotifyFinishedUpdate()
void CNetClientTurnManager::NotifyFinishedUpdate |
( |
u32 |
turn | ) |
|
|
overrideprivatevirtual |
Called when this client has finished a simulation update.
Implements CTurnManager.
◆ OnDestroyConnection()
void CNetClientTurnManager::OnDestroyConnection |
( |
| ) |
|
Notify the server that all commands are sent to prepare the connection for termination.
◆ OnSimulationMessage()
Called by networking code when a simulation message is received.
Implements CTurnManager.
◆ OnSyncError()
void CNetClientTurnManager::OnSyncError |
( |
u32 |
turn, |
|
|
const CStr & |
expectedHash, |
|
|
const std::vector< CSyncErrorMessage::S_m_PlayerNames > & |
playerNames |
|
) |
| |
◆ PostCommand()
void CNetClientTurnManager::PostCommand |
( |
JS::HandleValue |
data | ) |
|
|
overridevirtual |
Called by simulation code, to add a new command to be distributed to all clients and executed soon.
Implements CTurnManager.
◆ m_NetClient
The documentation for this class was generated from the following files: