summaryrefslogtreecommitdiff
path: root/players.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-08-10 14:32:17 +0000
committerdarkvater <darkvater@openttd.org>2004-08-10 14:32:17 +0000
commite4940ebc79149fee171d11ed33e10a810a25c379 (patch)
tree03ce1cb2a09c5888b5066489b8d20d5ec39d561d /players.c
parent804f038594ccd7d12b776299038f9bc5809f90e5 (diff)
downloadopenttd-e4940ebc79149fee171d11ed33e10a810a25c379.tar.xz
(svn r3) -[1005611] Player Window patch: When looking in dropdownlist for player stuff, it will say
for all human players (Player #), not only for the first 2
Diffstat (limited to 'players.c')
-rw-r--r--players.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/players.c b/players.c
index 542b12341..7aafdaa70 100644
--- a/players.c
+++ b/players.c
@@ -559,10 +559,13 @@ void RunOtherPlayersLoop()
_current_player = 0;
}
-StringID GetPlayerNameString(byte player)
+// index is the next parameter in _decode_parameters to set up
+StringID GetPlayerNameString(byte player, byte index)
{
- if (IS_HUMAN_PLAYER(player) && player < 2) // temporarily fixes the names in the list.
- return STR_7002_PLAYER_1+player;
+ if (IS_HUMAN_PLAYER(player) && player < MAX_PLAYERS) {
+ SET_DPARAM16(index, player+1);
+ return STR_7002_PLAYER;
+ }
return STR_EMPTY;
}