summaryrefslogtreecommitdiff
path: root/console_cmds.c
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2006-05-14 23:01:11 +0000
committerglx <glx@openttd.org>2006-05-14 23:01:11 +0000
commitc118d61e40391ad1cc586a4da2c2e1198201bc09 (patch)
tree33c105b21c9fb4ba4b0aa4b44f044144d958698b /console_cmds.c
parent6916ff4dcf03f5b1eda12400f8ba81bc67ba3b10 (diff)
downloadopenttd-c118d61e40391ad1cc586a4da2c2e1198201bc09.tar.xz
(svn r4871) - Fixed off-by-one and added company color displaying in 'players' console command.
Diffstat (limited to 'console_cmds.c')
-rw-r--r--console_cmds.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/console_cmds.c b/console_cmds.c
index 3194ed1b5..de040130b 100644
--- a/console_cmds.c
+++ b/console_cmds.c
@@ -1143,9 +1143,12 @@ DEF_CONSOLE_CMD(ConPlayers)
NetworkPopulateCompanyInfo();
FOR_ALL_PLAYERS(p) {
- if (!p->is_active)
- continue;
- IConsolePrintF(8, "#:%d Company Name: '%s' Year Founded: '%d' Money: '%d' Loan: '%d' Value: '%d'", p->index, _network_player_info[p->index].company_name, p->inaugurated_year + MAX_YEAR_BEGIN_REAL, p->player_money, p->current_loan, CalculateCompanyValue(p));
+ char buffer[512];
+
+ if (!p->is_active) continue;
+
+ GetString(buffer, STR_00D1_DARK_BLUE + _player_colors[p->index]);
+ IConsolePrintF(8, "#:%d(%s) Company Name: '%s' Year Founded: %d Money: %d Loan: %d Value: %d", p->index + 1, buffer, _network_player_info[p->index].company_name, p->inaugurated_year + MAX_YEAR_BEGIN_REAL, p->player_money, p->current_loan, CalculateCompanyValue(p));
}
return true;