The server-side counterpart to CNetClientTurnManager.
More...
#include <NetServerTurnManager.h>
The server-side counterpart to CNetClientTurnManager.
Records the turn state of each client, and sends turn advancement messages when clients are ready.
Thread-safety:
◆ CNetServerTurnManager()
◆ CheckClientsReady()
void CNetServerTurnManager::CheckClientsReady |
( |
| ) |
|
|
private |
◆ GetReadyTurn()
u32 CNetServerTurnManager::GetReadyTurn |
( |
| ) |
|
|
inline |
Returns the latest turn for which all clients are ready; they will have already been told to execute this turn.
◆ GetSavedTurnLength()
u32 CNetServerTurnManager::GetSavedTurnLength |
( |
u32 |
turn | ) |
|
Returns the turn length that was used for the given turn.
Requires turn <= GetReadyTurn().
◆ InitialiseClient()
void CNetServerTurnManager::InitialiseClient |
( |
int |
client, |
|
|
u32 |
turn, |
|
|
bool |
observer |
|
) |
| |
Inform the turn manager of a new client.
- Parameters
-
observer | - whether this client is an observer. |
◆ NONCOPYABLE()
◆ NotifyFinishedClientCommands()
◆ NotifyFinishedClientUpdate()
void CNetServerTurnManager::NotifyFinishedClientUpdate |
( |
CNetServerSession & |
session, |
|
|
u32 |
turn, |
|
|
const CStr & |
hash |
|
) |
| |
◆ SetTurnLength()
void CNetServerTurnManager::SetTurnLength |
( |
u32 |
msecs | ) |
|
◆ UninitialiseClient()
void CNetServerTurnManager::UninitialiseClient |
( |
int |
client | ) |
|
Inform the turn manager that a previously-initialised client has left the game.
◆ m_ClientsData
std::unordered_map<int, Client> CNetServerTurnManager::m_ClientsData |
|
private |
◆ m_ClientStateHashes
std::map<u32, std::map<int, std::string> > CNetServerTurnManager::m_ClientStateHashes |
|
private |
◆ m_HasSyncError
bool CNetServerTurnManager::m_HasSyncError = false |
|
private |
◆ m_NetServer
◆ m_ReadyTurn
u32 CNetServerTurnManager::m_ReadyTurn |
|
private |
The latest turn for which we have received all commands from all clients.
◆ m_SavedTurnLengths
std::vector<u32> CNetServerTurnManager::m_SavedTurnLengths |
|
private |
◆ m_TurnLength
u32 CNetServerTurnManager::m_TurnLength |
|
private |
The documentation for this class was generated from the following files: