summaryrefslogtreecommitdiff
path: root/src/autoreplace_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-06-03 15:07:27 +0000
committerfrosch <frosch@openttd.org>2012-06-03 15:07:27 +0000
commit8ec00c4cc9417bbc2971a6e2c5985f13af2f05f2 (patch)
tree46d1be24d213a151fa01b452cd0a9315e167ac0d /src/autoreplace_gui.cpp
parent0e9422c43a668fe08b30f96ccd1317bae5af8356 (diff)
downloadopenttd-8ec00c4cc9417bbc2971a6e2c5985f13af2f05f2.tar.xz
(svn r24321) -Change/Fix [FS#4254]: [NewGRF] Group vehicles in the purchase list properly by source GRF, but also consider engine GRFID overrides.
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r--src/autoreplace_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 83089a0b5..a54b454b5 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -34,7 +34,7 @@ void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList *
static int CDECL EngineNumberSorter(const EngineID *a, const EngineID *b)
{
- int r = ListPositionOfEngine(*a) - ListPositionOfEngine(*b);
+ int r = Engine::Get(*a)->list_position - Engine::Get(*b)->list_position;
return r;
}