diff options
author | alberth <alberth@openttd.org> | 2010-11-21 12:47:04 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-11-21 12:47:04 +0000 |
commit | 3e27739287dd52e80535c6fd583bb7db41859850 (patch) | |
tree | f87985fe2c203f381575ac8f78068643e18529c9 /src/saveload/vehicle_sl.cpp | |
parent | 5f8afaadb7e82b351a26fd5590c6b1e8d148b23b (diff) | |
download | openttd-3e27739287dd52e80535c6fd583bb7db41859850.tar.xz |
(svn r21284) -Codechange: Rename CheckSavegameVersion() to IsSavegameVersionBefore().
Diffstat (limited to 'src/saveload/vehicle_sl.cpp')
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 6962a4f85..c081ba2bc 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -268,7 +268,7 @@ void AfterLoadVehicles(bool part_of_load) FOR_ALL_VEHICLES(v) { if (v->orders.old != NULL) { - if (CheckSavegameVersion(105)) { // Pre-105 didn't save an OrderList + if (IsSavegameVersionBefore(105)) { // Pre-105 didn't save an OrderList if (mapping[v->orders.old] == NULL) { /* This adds the whole shared vehicle chain for case b */ v->orders.list = mapping[v->orders.old] = new OrderList(v->orders.old, v); @@ -297,7 +297,7 @@ void AfterLoadVehicles(bool part_of_load) } } - if (CheckSavegameVersion(105)) { + if (IsSavegameVersionBefore(105)) { /* Before 105 there was no order for shared orders, thus it messed up horribly */ FOR_ALL_VEHICLES(v) { if (v->First() != v || v->orders.list != NULL || v->previous_shared != NULL || v->next_shared == NULL) continue; @@ -344,7 +344,7 @@ void AfterLoadVehicles(bool part_of_load) } /* Stop non-front engines */ - if (CheckSavegameVersion(112)) { + if (IsSavegameVersionBefore(112)) { FOR_ALL_VEHICLES(v) { if (v->type == VEH_TRAIN) { Train *t = Train::From(v); @@ -739,11 +739,11 @@ void Load_VEHS() } /* Old savegames used 'last_station_visited = 0xFF' */ - if (CheckSavegameVersion(5) && v->last_station_visited == 0xFF) { + if (IsSavegameVersionBefore(5) && v->last_station_visited == 0xFF) { v->last_station_visited = INVALID_STATION; } - if (CheckSavegameVersion(5)) { + if (IsSavegameVersionBefore(5)) { /* Convert the current_order.type (which is a mix of type and flags, because * in those versions, they both were 4 bits big) to type and flags */ v->current_order.flags = GB(v->current_order.type, 4, 4); @@ -751,7 +751,7 @@ void Load_VEHS() } /* Advanced vehicle lists got added */ - if (CheckSavegameVersion(60)) v->group_id = DEFAULT_GROUP; + if (IsSavegameVersionBefore(60)) v->group_id = DEFAULT_GROUP; } } |