summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-21 11:16:10 +0000
committerrubidium <rubidium@openttd.org>2009-03-21 11:16:10 +0000
commit529dd0867f451cf3befbdf3feb3da146c77bd416 (patch)
tree3c4a9863d712ad40becc428dc70ccd8ffa3fea86 /src
parent3ef8a09e20d8ab33d3b87d63be0ffa2c34fb427a (diff)
downloadopenttd-529dd0867f451cf3befbdf3feb3da146c77bd416.tar.xz
(svn r15778) -Fix [FS#2749] (r15666): when sorting on cost don't sort on the running cost (sbr)
Diffstat (limited to 'src')
-rw-r--r--src/build_vehicle_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index b4f617adb..639eade40 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -120,8 +120,8 @@ static int CDECL EngineReliabilitySorter(const void *a, const void *b)
static int CDECL EngineCostSorter(const void *a, const void *b)
{
- int va = GetEngine(*(const EngineID*)a)->GetRunningCost();
- int vb = GetEngine(*(const EngineID*)b)->GetRunningCost();
+ Money va = GetEngine(*(const EngineID*)a)->GetCost();
+ Money vb = GetEngine(*(const EngineID*)b)->GetCost();
int r = ClampToI32(va - vb);
/* Use EngineID to sort instead since we want consistent sorting */