summaryrefslogtreecommitdiff
path: root/players.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-24 22:23:08 +0000
committerDarkvater <darkvater@openttd.org>2006-10-24 22:23:08 +0000
commit929cfa6687abff4d7278b9e89798c2d53e074bfe (patch)
tree2f3ab7b2a01f63b5c4a3b1a991074b3fd402599f /players.c
parentbc018eb7acba986b71405ab1694d13207c0c72fd (diff)
downloadopenttd-929cfa6687abff4d7278b9e89798c2d53e074bfe.tar.xz
(svn r6932) -Codechange: Send server messages with format NETWORK_ACTION_SERVER_MESSAGE so it is
general colour like the rest of the server messages. Spectators speak in grey.
Diffstat (limited to 'players.c')
-rw-r--r--players.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/players.c b/players.c
index ca3f44b05..e71e07efd 100644
--- a/players.c
+++ b/players.c
@@ -30,10 +30,9 @@
uint16 GetDrawStringPlayerColor(PlayerID player)
{
- /* Get the color for DrawString-subroutines which matches the color of the
- * player
- */
- if (player == PLAYER_SPECTATOR || player == PLAYER_SPECTATOR - 1) return 1;
+ /* Get the color for DrawString-subroutines which matches the color
+ * of the player */
+ if (!IsValidPlayer(player)) return _colour_gradient[COLOUR_WHITE][4] | IS_PALETTE_COLOR;
return (_colour_gradient[_player_colors[player]][4]) | IS_PALETTE_COLOR;
}