Merge branch 'master' into jgrpp-beta

# Conflicts:
#	src/network/core/game_info.h
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/network/network_client.h
#	src/network/network_internal.h
#	src/network/network_udp.cpp
This commit is contained in:
Jonathan G Rennison
2021-09-17 23:04:54 +01:00
26 changed files with 696 additions and 476 deletions

View File

@@ -25,7 +25,7 @@
*/
enum PacketGameType {
/*
* These first three pair of packets (thus six in
* These first four pair of packets (thus eight in
* total) must remain in this order for backward
* and forward compatibility between clients that
* are trying to join directly.
@@ -43,6 +43,10 @@ enum PacketGameType {
PACKET_CLIENT_COMPANY_INFO, ///< Request information about all companies.
PACKET_SERVER_COMPANY_INFO, ///< Information about a single company.
/* Packets used to get the game info. */
PACKET_CLIENT_GAME_INFO, ///< Request information about the server.
PACKET_SERVER_GAME_INFO, ///< Information about the server.
/*
* Packets after here assume that the client
* and server are running the same version. As
@@ -195,6 +199,19 @@ protected:
*/
virtual NetworkRecvStatus Receive_SERVER_ERROR(Packet *p);
/**
* Request game information.
* @param p The packet that was just received.
*/
virtual NetworkRecvStatus Receive_CLIENT_GAME_INFO(Packet *p);
/**
* Sends information about the game.
* Serialized NetworkGameInfo. See game_info.h for details.
* @param p The packet that was just received.
*/
virtual NetworkRecvStatus Receive_SERVER_GAME_INFO(Packet *p);
/**
* Request company information (in detail).
* @param p The packet that was just received.