Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
NetClient.cpp File Reference
#include "precompiled.h"
#include "NetClient.h"
#include "NetClientTurnManager.h"
#include "NetEnet.h"
#include "NetMessage.h"
#include "NetSession.h"
#include "lib/byte_order.h"
#include "lib/external_libraries/enet.h"
#include "lib/external_libraries/libsdl.h"
#include "lib/sysdep/sysdep.h"
#include "lobby/IXmppClient.h"
#include "ps/CConsole.h"
#include "ps/CLogger.h"
#include "ps/Compress.h"
#include "ps/CStr.h"
#include "ps/Game.h"
#include "ps/Hashing.h"
#include "ps/Loader.h"
#include "ps/Profile.h"
#include "ps/Threading.h"
#include "scriptinterface/ScriptInterface.h"
#include "scriptinterface/JSON.h"
#include "simulation2/Simulation2.h"
#include "network/StunClient.h"
Include dependency graph for NetClient.cpp:

Variables

constexpr u32 NETWORK_BAD_PING = DEFAULT_TURN_LENGTH * COMMAND_DELAY_MP / 2
 Once ping goes above turn length * command delay, the game will start 'freezing' for other clients while we catch up. More...
 
CNetClientg_NetClient = NULL
 Global network client for the standard game. More...
 

Variable Documentation

◆ g_NetClient

CNetClient* g_NetClient = NULL

Global network client for the standard game.

◆ NETWORK_BAD_PING

constexpr u32 NETWORK_BAD_PING = DEFAULT_TURN_LENGTH * COMMAND_DELAY_MP / 2
constexpr

Once ping goes above turn length * command delay, the game will start 'freezing' for other clients while we catch up.

Since commands are sent client -> server -> client, divide by 2. (duplicated in NetServer.cpp to avoid having to fetch the constants in a header file)