(svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "date_type.h"
|
||||
#include "town_type.h"
|
||||
#include "transport_type.h"
|
||||
#include "network/core/config.h"
|
||||
|
||||
/** Settings related to the difficulty of the game */
|
||||
struct DifficultySettings {
|
||||
@@ -82,6 +83,40 @@ struct GUISettings {
|
||||
byte news_message_timeout; ///< how much longer than the news message "age" should we keep the message in the history
|
||||
};
|
||||
|
||||
/** All settings related to the network. */
|
||||
struct NetworkSettings {
|
||||
#ifdef ENABLE_NETWORK
|
||||
uint16 sync_freq;
|
||||
uint8 frame_freq;
|
||||
uint16 max_join_time;
|
||||
bool pause_on_join;
|
||||
char server_bind_ip[NETWORK_HOSTNAME_LENGTH];
|
||||
uint16 server_port;
|
||||
bool server_advertise;
|
||||
uint8 lan_internet;
|
||||
char player_name[NETWORK_NAME_LENGTH];
|
||||
char server_password[NETWORK_PASSWORD_LENGTH];
|
||||
char rcon_password[NETWORK_PASSWORD_LENGTH];
|
||||
char default_company_pass[NETWORK_PASSWORD_LENGTH];
|
||||
char server_name[NETWORK_NAME_LENGTH];
|
||||
char connect_to_ip[NETWORK_HOSTNAME_LENGTH];
|
||||
char network_id[NETWORK_UNIQUE_ID_LENGTH];
|
||||
bool autoclean_companies;
|
||||
uint8 autoclean_unprotected;
|
||||
uint8 autoclean_protected;
|
||||
uint8 max_companies;
|
||||
uint8 max_clients;
|
||||
uint8 max_spectators;
|
||||
Year restart_game_year;
|
||||
uint8 min_players;
|
||||
uint8 server_lang;
|
||||
bool reload_cfg;
|
||||
char last_host[NETWORK_HOSTNAME_LENGTH];
|
||||
uint16 last_port;
|
||||
#else /* ENABLE_NETWORK */
|
||||
#endif
|
||||
};
|
||||
|
||||
/** Settings related to the creation of games. */
|
||||
struct GameCreationSettings {
|
||||
uint32 generation_seed; ///< noise seed for world generation
|
||||
@@ -281,6 +316,7 @@ struct GameSettings {
|
||||
/** All settings that are only important for the local client. */
|
||||
struct ClientSettings {
|
||||
GUISettings gui; ///< settings related to the GUI
|
||||
NetworkSettings network; ///< settings related to the network
|
||||
};
|
||||
|
||||
/** The current settings for this game. */
|
||||
|
Reference in New Issue
Block a user