Feature: [NewGRF] Allow higher max speeds for ships

This commit is contained in:
Koen Bussemaker
2023-04-28 21:23:59 +02:00
committed by rubidium42
parent 461d69a8f6
commit 5a55c4a934
7 changed files with 46 additions and 24 deletions

View File

@@ -3273,6 +3273,13 @@ bool AfterLoadGame()
}
}
if (IsSavegameVersionBefore(SLV_SHIP_ACCELERATION)) {
/* NewGRF acceleration information was added to ships. */
for (Ship *s : Ship::Iterate()) {
if (s->acceleration == 0) s->acceleration = ShipVehInfo(s->engine_type)->acceleration;
}
}
for (Company *c : Company::Iterate()) {
UpdateCompanyLiveries(c);
}

View File

@@ -371,6 +371,7 @@ enum SaveLoadVersion : uint16_t {
SLV_ECONOMY_DATE, ///< 326 PR#10700 Split calendar and economy timers and dates.
SLV_ECONOMY_MODE_TIMEKEEPING_UNITS, ///< 327 PR#11341 Mode to display economy measurements in wallclock units.
SLV_CALENDAR_SUB_DATE_FRACT, ///< 328 PR#11428 Add sub_date_fract to measure calendar days.
SLV_SHIP_ACCELERATION, ///< 329 PR#10734 Start using Vehicle's acceleration field for ships too.
SL_MAX_VERSION, ///< Highest possible saveload version
};