diff options
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index c1fb0c021..8dc6a36fe 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -40,6 +40,7 @@ #include "fileio.h" #include "hal.h" #include "airport.h" +#include "aircraft.h" #include "console.h" #include "screenshot.h" #include "network/network.h" @@ -1818,6 +1819,20 @@ bool AfterLoadGame(void) } } + if (CheckSavegameVersion(50)) { + Vehicle *v; + /* Aircraft units changed from 8 mph to 1 km/h */ + FOR_ALL_VEHICLES(v) { + if (v->type == VEH_Aircraft && v->subtype <= AIR_AIRCRAFT) { + const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type); + v->cur_speed *= 129; + v->cur_speed /= 10; + v->max_speed = avi->max_speed; + v->acceleration = avi->acceleration; + } + } + } + if (CheckSavegameVersion(49)) FOR_ALL_PLAYERS(p) p->face = ConvertFromOldPlayerFace(p->face); return true; |