(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
This commit is contained in:
darkvater
2004-08-10 14:32:17 +00:00
parent 804f038594
commit e4940ebc79
7 changed files with 17 additions and 15 deletions

View File

@@ -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;
}