summaryrefslogtreecommitdiff
path: root/src/players.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/players.cpp')
-rw-r--r--src/players.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/players.cpp b/src/players.cpp
index 14a2ab117..f4cb38787 100644
--- a/src/players.cpp
+++ b/src/players.cpp
@@ -1279,9 +1279,16 @@ static void SaveLoad_PLYR(Player* p)
}
/* Write each livery entry. */
- for (i = 0; i < LS_END; i++) {
+ int num_liveries = CheckSavegameVersion(63) ? LS_END - 2 : LS_END;
+ for (i = 0; i < num_liveries; i++) {
SlObject(&p->livery[i], _player_livery_desc);
}
+
+ if (num_liveries == LS_END - 2) {
+ /* Copy bus/truck liveries over to trams */
+ p->livery[LS_PASSENGER_TRAM] = p->livery[LS_BUS];
+ p->livery[LS_FREIGHT_TRAM] = p->livery[LS_TRUCK];
+ }
}
static void Save_PLYR()