| 858 | } |
| 859 | |
| 860 | static void MakeNewGameDone() |
| 861 | { |
| 862 | SettingsDisableElrail(_settings_game.vehicle.disable_elrails); |
| 863 | |
| 864 | /* In a dedicated server, the server does not play */ |
| 865 | if (!VideoDriver::GetInstance()->HasGUI()) { |
| 866 | OnStartGame(true); |
| 867 | if (_settings_client.gui.pause_on_newgame) Command<CMD_PAUSE>::Post(PauseMode::Normal, true); |
| 868 | return; |
| 869 | } |
| 870 | |
| 871 | /* Create a single company */ |
| 872 | DoStartupNewCompany(false); |
| 873 | |
| 874 | Company *c = Company::Get(CompanyID::Begin()); |
| 875 | c->settings = _settings_client.company; |
| 876 | |
| 877 | /* Overwrite colour from settings if needed |
| 878 | * COLOUR_END corresponds to Random colour */ |
| 879 | |
| 880 | if (_settings_client.gui.starting_colour != COLOUR_END) { |
| 881 | Command<CMD_SET_COMPANY_COLOUR>::Post(LS_DEFAULT, true, _settings_client.gui.starting_colour); |
| 882 | } |
| 883 | |
| 884 | if (_settings_client.gui.starting_colour_secondary != COLOUR_END && HasBit(_loaded_newgrf_features.used_liveries, LS_DEFAULT)) { |
| 885 | Command<CMD_SET_COMPANY_COLOUR>::Post(LS_DEFAULT, false, _settings_client.gui.starting_colour_secondary); |
| 886 | } |
| 887 | |
| 888 | OnStartGame(false); |
| 889 | |
| 890 | InitializeRailGUI(); |
| 891 | InitializeRoadGUI(); |
| 892 | |
| 893 | if (_settings_client.gui.pause_on_newgame) Command<CMD_PAUSE>::Post(PauseMode::Normal, true); |
| 894 | |
| 895 | CheckEngines(); |
| 896 | CheckIndustries(); |
| 897 | MarkWholeScreenDirty(); |
| 898 | } |
| 899 | |
| 900 | static void MakeNewGame(bool from_heightmap, bool reset_settings) |
| 901 | { |
nothing calls this directly
no test coverage detected