mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-03 01:38:09 +01:00
Codechange: make savegame-version checks more obvious in SlCompanyLiveries::Load
num_liveries indirectly contained the same information, but this makes reading these things pretty difficult. So use IsSavegameVersionBefore() like everywhere else instead.
This commit is contained in:
parent
4e645ce749
commit
3e3049fd0e
@ -423,14 +423,14 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num_liveries < LS_END) {
|
if (IsSavegameVersionBefore(SLV_85)) {
|
||||||
/* We want to insert some liveries somewhere in between. This means some have to be moved. */
|
/* We want to insert some liveries somewhere in between. This means some have to be moved. */
|
||||||
memmove(&c->livery[LS_FREIGHT_WAGON], &c->livery[LS_PASSENGER_WAGON_MONORAIL], (LS_END - LS_FREIGHT_WAGON) * sizeof(c->livery[0]));
|
memmove(&c->livery[LS_FREIGHT_WAGON], &c->livery[LS_PASSENGER_WAGON_MONORAIL], (LS_END - LS_FREIGHT_WAGON) * sizeof(c->livery[0]));
|
||||||
c->livery[LS_PASSENGER_WAGON_MONORAIL] = c->livery[LS_MONORAIL];
|
c->livery[LS_PASSENGER_WAGON_MONORAIL] = c->livery[LS_MONORAIL];
|
||||||
c->livery[LS_PASSENGER_WAGON_MAGLEV] = c->livery[LS_MAGLEV];
|
c->livery[LS_PASSENGER_WAGON_MAGLEV] = c->livery[LS_MAGLEV];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num_liveries == LS_END - 4) {
|
if (IsSavegameVersionBefore(SLV_63)) {
|
||||||
/* Copy bus/truck liveries over to trams */
|
/* Copy bus/truck liveries over to trams */
|
||||||
c->livery[LS_PASSENGER_TRAM] = c->livery[LS_BUS];
|
c->livery[LS_PASSENGER_TRAM] = c->livery[LS_BUS];
|
||||||
c->livery[LS_FREIGHT_TRAM] = c->livery[LS_TRUCK];
|
c->livery[LS_FREIGHT_TRAM] = c->livery[LS_TRUCK];
|
||||||
|
Loading…
Reference in New Issue
Block a user