mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r9716) -Add: server_lang in [network] section of openttd.cfg, so dedicated servers can have the little lang flag.
This commit is contained in:
parent
78e542a62e
commit
c1b898392e
|
@ -1395,11 +1395,13 @@ void NetworkStartUp()
|
|||
byte cl_max = _network_game_info.clients_max;
|
||||
byte cp_max = _network_game_info.companies_max;
|
||||
byte sp_max = _network_game_info.spectators_max;
|
||||
byte s_lang = _network_game_info.server_lang;
|
||||
|
||||
memset(&_network_game_info, 0, sizeof(_network_game_info));
|
||||
_network_game_info.clients_max = cl_max;
|
||||
_network_game_info.companies_max = cp_max;
|
||||
_network_game_info.spectators_max = sp_max;
|
||||
_network_game_info.server_lang = s_lang;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1004,7 +1004,7 @@ static void ini_save_setting_list(IniFile *ini, const char *grpname, char **list
|
|||
#define SDTG_CONDOMANY(name, type, flags, guiflags, var, def, max, full, str, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, max, 0, full, str, proc, from, to)
|
||||
#define SDTG_OMANY(name, type, flags, guiflags, var, def, max, full, str, proc)\
|
||||
SDTG_CONDOMANY(name, type, flags, guiflags, var, def, max full, str, proc, 0, SL_MAX_VERSION)
|
||||
SDTG_CONDOMANY(name, type, flags, guiflags, var, def, max, full, str, proc, 0, SL_MAX_VERSION)
|
||||
|
||||
#define SDTG_CONDMMANY(name, type, flags, guiflags, var, def, full, str, proc, from, to)\
|
||||
SDTG_GENERAL(name, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, 0, 0, full, str, proc, from, to)
|
||||
|
@ -1266,6 +1266,7 @@ static const SettingDescGlobVarList _network_settings[] = {
|
|||
SDTG_VAR("max_spectators", SLE_UINT8, S, 0, _network_game_info.spectators_max, 10, 0, 10, 0, STR_NULL, NULL),
|
||||
SDTG_VAR("restart_game_year", SLE_INT32, S,D0, _network_restart_game_year, 0, MIN_YEAR, MAX_YEAR, 1, STR_NULL, NULL),
|
||||
SDTG_VAR("min_players", SLE_UINT8, S, 0, _network_min_players, 0, 0, 10, 0, STR_NULL, NULL),
|
||||
SDTG_OMANY("server_lang", SLE_UINT8, S, 0, _network_game_info.server_lang, 0, 3, "ANY|ENGLISH|GERMAN|FRENCH", STR_NULL, NULL),
|
||||
SDTG_END()
|
||||
};
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
|
Loading…
Reference in New Issue