diff options
author | rubidium <rubidium@openttd.org> | 2009-07-02 08:59:27 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-02 08:59:27 +0000 |
commit | 61e735ba4c62e578ca16f708ac1fdc872ff6416d (patch) | |
tree | 5deab079f0b88a32b90e1d0ed7f44a140ace2560 /src/saveload | |
parent | 77eaefb61c9d1cbd4e6347e3fc042565a5b7572e (diff) | |
download | openttd-61e735ba4c62e578ca16f708ac1fdc872ff6416d.tar.xz |
(svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle.
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index b08d373d2..10d7d3c9c 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -314,8 +314,11 @@ void AfterLoadVehicles(bool part_of_load) t->tcache.last_speed = t->cur_speed; // update displayed train speed TrainConsistChanged(t, false); } - } else if (v->type == VEH_ROAD && IsRoadVehFront(v)) { - RoadVehUpdateCache(RoadVehicle::From(v)); + } else if (v->type == VEH_ROAD) { + RoadVehicle *rv = RoadVehicle::From(v); + if (rv->IsRoadVehFront()) { + RoadVehUpdateCache(rv); + } } } |