summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-10-12 11:42:57 +0000
committerDarkvater <Darkvater@openttd.org>2006-10-12 11:42:57 +0000
commit40365cc2924a2a0bcff6732a44432845b6fe6cf1 (patch)
tree36f9f8314abfadad8df25176c1475acfe3b83c12 /main_gui.c
parentafdc0c2e575e46161bed3267d8112dc9c98a66c7 (diff)
downloadopenttd-40365cc2924a2a0bcff6732a44432845b6fe6cf1.tar.xz
(svn r6748) -Codechange: Use already existing function to count active players.
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/main_gui.c b/main_gui.c
index 3254ffeb5..9726239c3 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -531,12 +531,7 @@ static int GetPlayerIndexFromMenu(int index)
static void UpdatePlayerMenuHeight(Window *w)
{
- uint num = 0;
- const Player *p;
-
- FOR_ALL_PLAYERS(p) {
- if (p->is_active) num++;
- }
+ byte num = ActivePlayerCount();
// Increase one to fit in PlayerList in the menu when in network
if (_networking && WP(w,menu_d).main_button == 9) num++;