diff options
author | rubidium <rubidium@openttd.org> | 2007-08-27 21:33:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-27 21:33:26 +0000 |
commit | ac838de385f25f473a2305ac666d35babf42f3ab (patch) | |
tree | 547b6661ba325dd3a5f5a287a7202ee034590910 /src/autoreplace_gui.cpp | |
parent | 5ce935c6ebf8ea88bb28909addbb0ccf937acaba (diff) | |
download | openttd-ac838de385f25f473a2305ac666d35babf42f3ab.tar.xz |
(svn r10992) -Fix [FS#1132]: huge amount of vehicles in the "ungrouped" group. Patch by frosch.
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r-- | src/autoreplace_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 062d951ef..68c95ec3a 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -49,7 +49,7 @@ void InvalidateAutoreplaceWindow(EngineID e, GroupID id_g) { Player *p = GetPlayer(_local_player); byte type = GetEngine(e)->type; - uint num_engines = GetGroupNumEngines(id_g, e); + uint num_engines = GetGroupNumEngines(_local_player, id_g, e); if (num_engines == 0 || p->num_engines[e] == 0) { /* We don't have any of this engine type. @@ -154,7 +154,7 @@ static void GenerateReplaceVehList(Window *w, bool draw_left) if (draw_left) { const GroupID selected_group = WP(w, replaceveh_d).sel_group; - const uint num_engines = GetGroupNumEngines(selected_group, e); + const uint num_engines = GetGroupNumEngines(_local_player, selected_group, e); /* Skip drawing the engines we don't have any of and haven't set for replacement */ if (num_engines == 0 && EngineReplacementForPlayer(GetPlayer(_local_player), e, selected_group) == INVALID_ENGINE) continue; |