summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-03-22 21:27:13 +0000
committerfrosch <frosch@openttd.org>2013-03-22 21:27:13 +0000
commit30f601d685196464cb86b32f2f3f2b13019f0735 (patch)
treec5a2834af593e935abc6c6426861a5f1b2edc66f /src/saveload
parent9eab26a1a1bdccb4da54f598e861f029aa72f41f (diff)
downloadopenttd-30f601d685196464cb86b32f2f3f2b13019f0735.tar.xz
(svn r25115) -Fix (r8973) [FS#5492-ish]: [NewGRF] Acceleration of NewGRF aircraft was too fast, while acceleration of default aircraft was way too slow. I.e. choose wisely who to let write the software for your orbiter.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 15c44d392..a3837942c 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2761,6 +2761,17 @@ bool AfterLoadGame()
_settings_game.script.settings_profile = IsInsideMM(_old_diff_level, SP_BEGIN, SP_END) ? _old_diff_level : (uint)SP_MEDIUM;
}
+ if (IsSavegameVersionBefore(182)) {
+ Aircraft *v;
+ /* Aircraft acceleration variable was bonkers */
+ FOR_ALL_AIRCRAFT(v) {
+ if (v->subtype <= AIR_AIRCRAFT) {
+ const AircraftVehicleInfo *avi = AircraftVehInfo(v->engine_type);
+ v->acceleration = avi->acceleration;
+ }
+ }
+ }
+
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();