OpenTTD Source: NetworkServerGameInfo Struct Reference

OpenTTD Source 15.0-RC2

Data Fields
NetworkServerGameInfo Struct Reference

The game information that is sent from the server to the client. More...

`#include <network_game_info.h>`

Inheritance diagram for NetworkServerGameInfo:

## Data Fields
GRFConfigList | grfconfig
| List of NewGRF files used.
TimerGameCalendar::Date | calendar_start
| When the game started.
TimerGameCalendar::Date | calendar_date
| Current calendar date.
TimerGameTick::TickCounter | ticks_playing
| Amount of ticks the game has been running unpaused.
uint16_t | map_width
| Map width.
uint16_t | map_height
| Map height.
std::string | server_name
| Server name.
std::string | server_revision
| The version number the server is using (e.g.: 'r304' or 0.5.0)
bool | dedicated
| Is this a dedicated server?
bool | use_password
| Is this server passworded?
uint8_t | clients_on
| Current count of clients on server.
uint8_t | clients_max
| Max clients allowed on server.
uint8_t | companies_on
| How many started companies do we have.
uint8_t | companies_max
| Max companies allowed on server.
uint8_t | spectators_on
| How many spectators do we have?
LandscapeType | landscape
| The used landscape.
int | gamescript_version
| Version of the gamescript.
std::string | gamescript_name
| Name of the gamescript.

## Detailed Description

The game information that is sent from the server to the client.

Definition at line 97 of file network_game_info.h.

## Field Documentation

## ◆ calendar_date

TimerGameCalendar::Date NetworkServerGameInfo::calendar_date

Current calendar date.

Definition at line 100 of file network_game_info.h.

Referenced by NetworkGameWindow::DrawServerLine(), and NetworkGameWindow::NGameCalendarDateSorter().

## ◆ calendar_start

TimerGameCalendar::Date NetworkServerGameInfo::calendar_start

When the game started.

Definition at line 99 of file network_game_info.h.

## ◆ clients_max

uint8_t NetworkServerGameInfo::clients_max

Max clients allowed on server.

Definition at line 109 of file network_game_info.h.

Referenced by NetworkGameWindow::DrawServerLine(), NetworkGameWindow::NGameClientSorter(), and NetworkGameWindow::OnPaint().

## ◆ clients_on

uint8_t NetworkServerGameInfo::clients_on

Current count of clients on server.

Definition at line 108 of file network_game_info.h.

Referenced by ServerNetworkGameSocketHandler::CloseConnection(), NetworkGameWindow::DrawServerLine(), NetworkGameWindow::NGameClientSorter(), NetworkGameWindow::OnPaint(), ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(), and ServerNetworkGameSocketHandler::SendWelcome().

## ◆ companies_max

uint8_t NetworkServerGameInfo::companies_max

Max companies allowed on server.

Definition at line 111 of file network_game_info.h.

Referenced by NetworkGameWindow::DrawServerLine().

## ◆ companies_on

uint8_t NetworkServerGameInfo::companies_on

How many started companies do we have.

Definition at line 110 of file network_game_info.h.

Referenced by NetworkGameWindow::DrawServerLine().

## ◆ dedicated

bool NetworkServerGameInfo::dedicated

Is this a dedicated server?

Definition at line 106 of file network_game_info.h.

## ◆ gamescript_name

std::string NetworkServerGameInfo::gamescript_name

Name of the gamescript.

Definition at line 115 of file network_game_info.h.

## ◆ gamescript_version

int NetworkServerGameInfo::gamescript_version

Version of the gamescript.

Definition at line 114 of file network_game_info.h.

## ◆ grfconfig

GRFConfigList NetworkServerGameInfo::grfconfig

List of NewGRF files used.

Definition at line 98 of file network_game_info.h.

Referenced by NetworkAddServer(), NetworkGameWindow::OnClick(), NetworkGameWindow::OnPaint(), ClientNetworkCoordinatorSocketHandler::Receive_GC_LISTING(), and QueryNetworkGameSocketHandler::Receive_SERVER_GAME_INFO().

## ◆ landscape

LandscapeType NetworkServerGameInfo::landscape

The used landscape.

Definition at line 113 of file network_game_info.h.

## ◆ map_height

uint16_t NetworkServerGameInfo::map_height

Map height.

Definition at line 103 of file network_game_info.h.

Referenced by NetworkGameWindow::DrawServerLine(), and NetworkGameWindow::NGameMapSizeSorter().

## ◆ map_width

uint16_t NetworkServerGameInfo::map_width

Map width.

Definition at line 102 of file network_game_info.h.

Referenced by NetworkGameWindow::DrawServerLine(), and NetworkGameWindow::NGameMapSizeSorter().

## ◆ server_name

std::string NetworkServerGameInfo::server_name

Server name.

Definition at line 104 of file network_game_info.h.

Referenced by NetworkGameWindow::DrawServerLine(), NetworkAddServer(), and NetworkGameWindow::NGameNameSorter().

## ◆ server_revision

std::string NetworkServerGameInfo::server_revision

The version number the server is using (e.g.: 'r304' or 0.5.0)

Definition at line 105 of file network_game_info.h.

Referenced by NetworkGameWindow::NGameAllowedSorter().

## ◆ spectators_on

uint8_t NetworkServerGameInfo::spectators_on

How many spectators do we have?

Definition at line 112 of file network_game_info.h.

## ◆ ticks_playing

TimerGameTick::TickCounter NetworkServerGameInfo::ticks_playing

Amount of ticks the game has been running unpaused.

Definition at line 101 of file network_game_info.h.

Referenced by NetworkGameWindow::DrawServerLine(), and NetworkGameWindow::NGameTicksPlayingSorter().

## ◆ use_password

bool NetworkServerGameInfo::use_password

Is this server passworded?

Definition at line 107 of file network_game_info.h.

Referenced by NetworkGameWindow::DrawServerLine(), and NetworkGameWindow::NGameAllowedSorter().

The documentation for this struct was generated from the following file:

- src/network/core/network_game_info.h