Merge branch 'master' into jgrpp
# Conflicts: # config.lib # projects/openttd_vs140.vcxproj # projects/openttd_vs140.vcxproj.filters # projects/openttd_vs141.vcxproj # projects/openttd_vs141.vcxproj.filters # projects/openttd_vs142.vcxproj # projects/openttd_vs142.vcxproj.filters # src/aircraft_cmd.cpp # src/base_station_base.h # src/core/pool_type.hpp # src/disaster_vehicle.cpp # src/economy.cpp # src/engine.cpp # src/group.h # src/group_cmd.cpp # src/group_gui.cpp # src/lang/english.txt # src/lang/german.txt # src/linkgraph/linkgraph_gui.cpp # src/network/network_command.cpp # src/network/network_server.cpp # src/openttd.cpp # src/order_cmd.cpp # src/road_cmd.cpp # src/saveload/afterload.cpp # src/saveload/cargopacket_sl.cpp # src/saveload/linkgraph_sl.cpp # src/saveload/order_sl.cpp # src/saveload/station_sl.cpp # src/saveload/town_sl.cpp # src/saveload/vehicle_sl.cpp # src/screenshot.cpp # src/screenshot.h # src/settings_gui.cpp # src/settings_type.h # src/smallmap_gui.cpp # src/station.cpp # src/station_cmd.cpp # src/table/settings.ini # src/toolbar_gui.cpp # src/town_cmd.cpp # src/train.h # src/train_cmd.cpp # src/train_gui.cpp # src/vehicle.cpp # src/vehicle_base.h # src/vehiclelist.cpp # src/window_type.h
This commit is contained in:
@@ -109,8 +109,7 @@ static void FixTTDMapArray()
|
||||
|
||||
static void FixTTDDepots()
|
||||
{
|
||||
const Depot *d;
|
||||
FOR_ALL_DEPOTS_FROM(d, 252) {
|
||||
for (const Depot *d : Depot::Iterate(252)) {
|
||||
if (!IsDepotTile(d->xy) || GetDepotIndex(d->xy) != d->index) {
|
||||
/** Workaround for SVXConverter bug, depots 252-255 could be invalid */
|
||||
delete d;
|
||||
@@ -153,10 +152,8 @@ static uint32 RemapOldTownName(uint32 townnameparts, byte old_town_name_type)
|
||||
|
||||
static void FixOldTowns()
|
||||
{
|
||||
Town *town;
|
||||
|
||||
/* Convert town-names if needed */
|
||||
FOR_ALL_TOWNS(town) {
|
||||
for (Town *town : Town::Iterate()) {
|
||||
if (IsInsideMM(town->townnametype, 0x20C1, 0x20C3)) {
|
||||
town->townnametype = SPECSTR_TOWNNAME_ENGLISH + _settings_game.game_creation.town_name;
|
||||
town->townnameparts = RemapOldTownName(town->townnameparts, _settings_game.game_creation.town_name);
|
||||
@@ -173,9 +170,7 @@ static StringID *_old_vehicle_names;
|
||||
*/
|
||||
void FixOldVehicles()
|
||||
{
|
||||
Vehicle *v;
|
||||
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
for (Vehicle *v : Vehicle::Iterate()) {
|
||||
if ((size_t)v->next == 0xFFFF) {
|
||||
v->next = nullptr;
|
||||
} else {
|
||||
@@ -385,8 +380,7 @@ static bool FixTTOEngines()
|
||||
233, 234, 235, 236, 237, 238, 253
|
||||
};
|
||||
|
||||
Vehicle *v;
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
for (Vehicle *v : Vehicle::Iterate()) {
|
||||
if (v->engine_type >= lengthof(tto_to_ttd)) return false;
|
||||
v->engine_type = tto_to_ttd[v->engine_type];
|
||||
}
|
||||
@@ -459,8 +453,7 @@ static bool FixTTOEngines()
|
||||
|
||||
static void FixTTOCompanies()
|
||||
{
|
||||
Company *c;
|
||||
FOR_ALL_COMPANIES(c) {
|
||||
for (Company *c : Company::Iterate()) {
|
||||
c->cur_economy.company_value = CalculateCompanyValue(c); // company value history is zeroed
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user