equal
deleted
inserted
replaced
483 * way all internal drawing routines work correctly. */ |
483 * way all internal drawing routines work correctly. */ |
484 if (_cur_resolution[0] == 0) _cur_resolution[0] = 1; |
484 if (_cur_resolution[0] == 0) _cur_resolution[0] = 1; |
485 if (_cur_resolution[1] == 0) _cur_resolution[1] = 1; |
485 if (_cur_resolution[1] == 0) _cur_resolution[1] = 1; |
486 |
486 |
487 #if defined(ENABLE_NETWORK) |
487 #if defined(ENABLE_NETWORK) |
488 if (dedicated_host) snprintf(_network_server_bind_ip_host, NETWORK_HOSTNAME_LENGTH, "%s", dedicated_host); |
488 if (dedicated_host) snprintf(_settings_client.network.server_bind_ip, sizeof(_settings_client.network.server_bind_ip), "%s", dedicated_host); |
489 if (dedicated_port) _network_server_port = dedicated_port; |
489 if (dedicated_port) _settings_client.network.server_port = dedicated_port; |
490 if (_dedicated_forks && !dedicated) _dedicated_forks = false; |
490 if (_dedicated_forks && !dedicated) _dedicated_forks = false; |
491 #endif /* ENABLE_NETWORK */ |
491 #endif /* ENABLE_NETWORK */ |
492 |
492 |
493 /* enumerate language files */ |
493 /* enumerate language files */ |
494 InitializeLanguagePacks(); |
494 InitializeLanguagePacks(); |
678 InitializeRailGUI(); |
678 InitializeRailGUI(); |
679 |
679 |
680 #ifdef ENABLE_NETWORK |
680 #ifdef ENABLE_NETWORK |
681 /* We are the server, we start a new player (not dedicated), |
681 /* We are the server, we start a new player (not dedicated), |
682 * so set the default password *if* needed. */ |
682 * so set the default password *if* needed. */ |
683 if (_network_server && !StrEmpty(_network_default_company_pass)) { |
683 if (_network_server && !StrEmpty(_settings_client.network.default_company_pass)) { |
684 char *password = _network_default_company_pass; |
684 char *password = _settings_client.network.default_company_pass; |
685 NetworkChangeCompanyPassword(1, &password); |
685 NetworkChangeCompanyPassword(1, &password); |
686 } |
686 } |
687 #endif /* ENABLE_NETWORK */ |
687 #endif /* ENABLE_NETWORK */ |
688 |
688 |
689 MarkWholeScreenDirty(); |
689 MarkWholeScreenDirty(); |
820 /* If we are a server, we restart the server */ |
820 /* If we are a server, we restart the server */ |
821 if (_is_network_server) { |
821 if (_is_network_server) { |
822 /* But not if we are going to the menu */ |
822 /* But not if we are going to the menu */ |
823 if (new_mode != SM_MENU) { |
823 if (new_mode != SM_MENU) { |
824 /* check if we should reload the config */ |
824 /* check if we should reload the config */ |
825 if (_network_reload_cfg) { |
825 if (_settings_client.network.reload_cfg) { |
826 LoadFromConfig(); |
826 LoadFromConfig(); |
827 _settings_game = _settings_newgame; |
827 _settings_game = _settings_newgame; |
828 ResetGRFConfig(false); |
828 ResetGRFConfig(false); |
829 } |
829 } |
830 NetworkServerStart(); |
830 NetworkServerStart(); |
1100 NetworkGameLoop(); |
1100 NetworkGameLoop(); |
1101 } else { |
1101 } else { |
1102 if (_network_reconnect > 0 && --_network_reconnect == 0) { |
1102 if (_network_reconnect > 0 && --_network_reconnect == 0) { |
1103 /* This means that we want to reconnect to the last host |
1103 /* This means that we want to reconnect to the last host |
1104 * We do this here, because it means that the network is really closed */ |
1104 * We do this here, because it means that the network is really closed */ |
1105 NetworkClientConnectGame(_network_last_host, _network_last_port); |
1105 NetworkClientConnectGame(_settings_client.network.last_host, _settings_client.network.last_port); |
1106 } |
1106 } |
1107 /* Singleplayer */ |
1107 /* Singleplayer */ |
1108 StateGameLoop(); |
1108 StateGameLoop(); |
1109 } |
1109 } |
1110 #else |
1110 #else |