summaryrefslogtreecommitdiff
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
commit34eb5364bbfa6a3093f9ff062a5909349b09ea22 (patch)
tree3c4a9863d712ad40becc428dc70ccd8ffa3fea86
parent4eea5c966944ef83aca0c72569a35f092809f3fd (diff)
downloadopenttd-34eb5364bbfa6a3093f9ff062a5909349b09ea22.tar.xz
(svn r15778) -Fix [FS#2749] (r15666): when sorting on cost don't sort on the running cost (sbr)
-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 */