Fix vehicle timetable automate flag from ChillPP v8 savegames

This commit is contained in:
Jonathan G Rennison
2020-01-03 13:02:35 +00:00
parent b8b84a9a0b
commit c681a9d5de

View File

@@ -3344,7 +3344,7 @@ bool AfterLoadGame()
}
}
if (SlXvIsFeaturePresent(XSLFI_CHILLPP)) {
if (SlXvIsFeaturePresent(XSLFI_CHILLPP, SL_CHILLPP_232)) {
// re-arrange vehicle_flags
Vehicle *v;
FOR_ALL_VEHICLES(v) {
@@ -3352,6 +3352,13 @@ bool AfterLoadGame()
SB(v->vehicle_flags, VF_PATHFINDER_LOST, 1, GB(v->vehicle_flags, 8, 1));
SB(v->vehicle_flags, VF_SERVINT_IS_CUSTOM, 7, 0);
}
} else if (SlXvIsFeaturePresent(XSLFI_CHILLPP)) {
// re-arrange vehicle_flags
Vehicle *v;
FOR_ALL_VEHICLES(v) {
SB(v->vehicle_flags, VF_AUTOMATE_TIMETABLE, 1, GB(v->vehicle_flags, 6, 1));
SB(v->vehicle_flags, VF_STOP_LOADING, 9, 0);
}
}
if (IsSavegameVersionBefore(SLV_188)) {