players.c
changeset 2 104b2984cd3e
parent 1 0ea1e0a5c4df
child 23 324407ad61da
--- a/players.c	Tue Aug 10 14:14:00 2004 +0000
+++ b/players.c	Tue Aug 10 14:32:17 2004 +0000
@@ -559,10 +559,13 @@
 	_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;
 }