diff options
author | terkhen <terkhen@openttd.org> | 2010-11-06 13:03:17 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-11-06 13:03:17 +0000 |
commit | 25d1b2f54b9cac01e2737848c208f6d8096a4a92 (patch) | |
tree | 37860a84857248e929612d7ed018a4e2065d31cd /src/vehicle_gui.cpp | |
parent | c8a56f17f82be7d4a8e935fc514c86a313dc7d15 (diff) | |
download | openttd-25d1b2f54b9cac01e2737848c208f6d8096a4a92.tar.xz |
(svn r21098) -Codechange: Ships now store their max speed in the cache instead of recalculating it every time.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 7c788b3eb..7adacc88c 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -807,7 +807,7 @@ static int CDECL VehicleReliabilitySorter(const Vehicle * const *a, const Vehicl static int CDECL VehicleMaxSpeedSorter(const Vehicle * const *a, const Vehicle * const *b) { int r = 0; - if (((*a)->type == VEH_TRAIN && (*b)->type == VEH_TRAIN) || ((*a)->type == VEH_AIRCRAFT && (*b)->type == VEH_AIRCRAFT)) { + if ((*a)->type != VEH_ROAD && (*b)->type != VEH_ROAD) { r = (*a)->vcache.cached_max_speed - (*b)->vcache.cached_max_speed; } else { r = (*a)->max_speed - (*b)->max_speed; |