equal
deleted
inserted
replaced
1263 if (_file_to_saveload.filetype == FT_SCENARIO && p->inaugurated_year != MIN_YEAR) { |
1263 if (_file_to_saveload.filetype == FT_SCENARIO && p->inaugurated_year != MIN_YEAR) { |
1264 p->inaugurated_year = _cur_year; |
1264 p->inaugurated_year = _cur_year; |
1265 } |
1265 } |
1266 } |
1266 } |
1267 |
1267 |
|
1268 InitializeVehicleCaches(); |
|
1269 |
1268 SetCachedEngineCounts(); |
1270 SetCachedEngineCounts(); |
1269 |
1271 |
1270 /* Towns have a noise controlled number of airports system |
1272 /* Towns have a noise controlled number of airports system |
1271 * So each airport's noise value must be added to the town->noise_reached value |
1273 * So each airport's noise value must be added to the town->noise_reached value |
1272 * Reset each town's noise_reached value to '0' before. */ |
1274 * Reset each town's noise_reached value to '0' before. */ |
1379 /* Connect front and rear engines of multiheaded trains */ |
1381 /* Connect front and rear engines of multiheaded trains */ |
1380 ConnectMultiheadedTrains(); |
1382 ConnectMultiheadedTrains(); |
1381 |
1383 |
1382 /* reinit the landscape variables (landscape might have changed) */ |
1384 /* reinit the landscape variables (landscape might have changed) */ |
1383 InitializeLandscapeVariables(true); |
1385 InitializeLandscapeVariables(true); |
1384 |
|
1385 /* from version 38 we have optional elrails, since we cannot know the |
|
1386 * preference of a user, let elrails enabled; it can be disabled manually */ |
|
1387 if (CheckSavegameVersion(38)) _settings_game.vehicle.disable_elrails = false; |
|
1388 |
|
1389 /* Do the same as when elrails were enabled/disabled manually just now. |
|
1390 * This needs to be done before AfterLoadVehicles because that relies on |
|
1391 * the compatible railtypes and such to be correct. */ |
|
1392 SettingsDisableElrail(_settings_game.vehicle.disable_elrails); |
|
1393 InitializeRailGUI(); |
|
1394 |
1386 |
1395 /* Update all vehicles */ |
1387 /* Update all vehicles */ |
1396 AfterLoadVehicles(true); |
1388 AfterLoadVehicles(true); |
1397 |
1389 |
1398 /* Update all waypoints */ |
1390 /* Update all waypoints */ |
1961 FOR_ALL_VEHICLES(v) { |
1953 FOR_ALL_VEHICLES(v) { |
1962 v->current_order.SetRefit(CT_NO_REFIT); |
1954 v->current_order.SetRefit(CT_NO_REFIT); |
1963 } |
1955 } |
1964 } |
1956 } |
1965 |
1957 |
|
1958 /* from version 38 we have optional elrails, since we cannot know the |
|
1959 * preference of a user, let elrails enabled; it can be disabled manually */ |
|
1960 if (CheckSavegameVersion(38)) _settings_game.vehicle.disable_elrails = false; |
|
1961 /* do the same as when elrails were enabled/disabled manually just now */ |
|
1962 SettingsDisableElrail(_settings_game.vehicle.disable_elrails); |
|
1963 InitializeRailGUI(); |
|
1964 |
1966 /* From version 53, the map array was changed for house tiles to allow |
1965 /* From version 53, the map array was changed for house tiles to allow |
1967 * space for newhouses grf features. A new byte, m7, was also added. */ |
1966 * space for newhouses grf features. A new byte, m7, was also added. */ |
1968 if (CheckSavegameVersion(53)) { |
1967 if (CheckSavegameVersion(53)) { |
1969 for (TileIndex t = 0; t < map_size; t++) { |
1968 for (TileIndex t = 0; t < map_size; t++) { |
1970 if (IsTileType(t, MP_HOUSE)) { |
1969 if (IsTileType(t, MP_HOUSE)) { |