Update NETWORK_GAME_INFO_VERSION to version 7
This commit is contained in:
@@ -47,7 +47,7 @@ static const uint16_t TCP_MTU = 32767; ///< Numbe
|
|||||||
static const uint16_t COMPAT_MTU = 1460; ///< Number of bytes we can pack in a single packet for backward compatibility
|
static const uint16_t COMPAT_MTU = 1460; ///< Number of bytes we can pack in a single packet for backward compatibility
|
||||||
|
|
||||||
static const byte NETWORK_GAME_ADMIN_VERSION = 3; ///< What version of the admin network do we use?
|
static const byte NETWORK_GAME_ADMIN_VERSION = 3; ///< What version of the admin network do we use?
|
||||||
static const byte NETWORK_GAME_INFO_VERSION = 6; ///< What version of game-info do we use?
|
static const byte NETWORK_GAME_INFO_VERSION = 7; ///< What version of game-info do we use?
|
||||||
static const byte NETWORK_COORDINATOR_VERSION = 6; ///< What version of game-coordinator-protocol do we use?
|
static const byte NETWORK_COORDINATOR_VERSION = 6; ///< What version of game-coordinator-protocol do we use?
|
||||||
static const byte NETWORK_SURVEY_VERSION = 1; ///< What version of the survey do we use?
|
static const byte NETWORK_SURVEY_VERSION = 1; ///< What version of the survey do we use?
|
||||||
|
|
||||||
|
@@ -158,6 +158,7 @@ const NetworkServerGameInfo *GetCurrentNetworkServerGameInfo()
|
|||||||
_network_game_info.companies_on = (byte)Company::GetNumItems();
|
_network_game_info.companies_on = (byte)Company::GetNumItems();
|
||||||
_network_game_info.spectators_on = NetworkSpectatorCount();
|
_network_game_info.spectators_on = NetworkSpectatorCount();
|
||||||
_network_game_info.game_date = _date;
|
_network_game_info.game_date = _date;
|
||||||
|
_network_game_info.ticks_playing = _scaled_tick_counter;
|
||||||
return &_network_game_info;
|
return &_network_game_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,6 +203,9 @@ void SerializeNetworkGameInfo(Packet *p, const NetworkServerGameInfo *info, bool
|
|||||||
/* Update the documentation in game_info.h on changes
|
/* Update the documentation in game_info.h on changes
|
||||||
* to the NetworkGameInfo wire-protocol! */
|
* to the NetworkGameInfo wire-protocol! */
|
||||||
|
|
||||||
|
/* NETWORK_GAME_INFO_VERSION = 7 */
|
||||||
|
p->Send_uint64(info->ticks_playing);
|
||||||
|
|
||||||
/* NETWORK_GAME_INFO_VERSION = 6 */
|
/* NETWORK_GAME_INFO_VERSION = 6 */
|
||||||
p->Send_uint8(send_newgrf_names ? NST_GRFID_MD5_NAME : NST_GRFID_MD5);
|
p->Send_uint8(send_newgrf_names ? NST_GRFID_MD5_NAME : NST_GRFID_MD5);
|
||||||
|
|
||||||
|
@@ -27,6 +27,8 @@
|
|||||||
* Version: Bytes: Description:
|
* Version: Bytes: Description:
|
||||||
* all 1 the version of this packet's structure
|
* all 1 the version of this packet's structure
|
||||||
*
|
*
|
||||||
|
* 7+ 8 amount of ticks this game has been running unpaused.
|
||||||
|
*
|
||||||
* 6+ 1 type of storage for the NewGRFs below:
|
* 6+ 1 type of storage for the NewGRFs below:
|
||||||
* 0 = NewGRF ID and MD5 checksum.
|
* 0 = NewGRF ID and MD5 checksum.
|
||||||
* Used as default for version 5 and below, and for
|
* Used as default for version 5 and below, and for
|
||||||
@@ -94,6 +96,7 @@ struct NetworkServerGameInfo {
|
|||||||
GRFConfig *grfconfig; ///< List of NewGRF files used
|
GRFConfig *grfconfig; ///< List of NewGRF files used
|
||||||
Date start_date; ///< When the game started
|
Date start_date; ///< When the game started
|
||||||
Date game_date; ///< Current date
|
Date game_date; ///< Current date
|
||||||
|
uint64_t ticks_playing; ///< Amount of ticks the game has been running unpaused.
|
||||||
uint32_t map_width; ///< Map width
|
uint32_t map_width; ///< Map width
|
||||||
uint32_t map_height; ///< Map height
|
uint32_t map_height; ///< Map height
|
||||||
std::string server_name; ///< Server name
|
std::string server_name; ///< Server name
|
||||||
|
Reference in New Issue
Block a user