summaryrefslogtreecommitdiff
path: root/src/settings_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-29 20:21:28 +0000
committerrubidium <rubidium@openttd.org>2008-05-29 20:21:28 +0000
commit02dbab87215c23aa85adbb538cb32041b69150db (patch)
tree734284d7c9344a063b89c7e239647be25ca07424 /src/settings_type.h
parent4b2c2521f97d0048d3545e97a133e34a4f28990f (diff)
downloadopenttd-02dbab87215c23aa85adbb538cb32041b69150db.tar.xz
(svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
Diffstat (limited to 'src/settings_type.h')
-rw-r--r--src/settings_type.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/settings_type.h b/src/settings_type.h
index b91bed690..c73b60589 100644
--- a/src/settings_type.h
+++ b/src/settings_type.h
@@ -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. */