summaryrefslogtreecommitdiff
path: root/src/network/network.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-24 10:35:15 +0000
committerrubidium <rubidium@openttd.org>2008-05-24 10:35:15 +0000
commit6884f9cb419d141a09ed96ea6aab6f7bf245a6f5 (patch)
tree10eb78cf497a4c50a6ad92f8c547d50b538cf425 /src/network/network.cpp
parent6c20f77330468a954ca2abcd396ab4135ea176fd (diff)
downloadopenttd-6884f9cb419d141a09ed96ea6aab6f7bf245a6f5.tar.xz
(svn r13229) -Codechange: replace some global variables that are only initialised once and always with the same value with enums.
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r--src/network/network.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index dfb086da0..3a9203424 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -141,7 +141,7 @@ byte NetworkSpectatorCount()
// This puts a text-message to the console, or in the future, the chat-box,
// (to keep it all a bit more general)
// If 'self_send' is true, this is the client who is sending the message
-void CDECL NetworkTextMessage(NetworkAction action, uint16 color, bool self_send, const char *name, const char *str, ...)
+void CDECL NetworkTextMessage(NetworkAction action, ConsoleColour color, bool self_send, const char *name, const char *str, ...)
{
char buf[1024];
va_list va;
@@ -155,16 +155,16 @@ void CDECL NetworkTextMessage(NetworkAction action, uint16 color, bool self_send
switch (action) {
case NETWORK_ACTION_SERVER_MESSAGE:
- color = 1;
+ color = CC_DEFAULT;
snprintf(message, sizeof(message), "*** %s", buf);
break;
case NETWORK_ACTION_JOIN:
- color = 1;
+ color = CC_DEFAULT;
GetString(temp, STR_NETWORK_CLIENT_JOINED, lastof(temp));
snprintf(message, sizeof(message), "*** %s %s", name, temp);
break;
case NETWORK_ACTION_LEAVE:
- color = 1;
+ color = CC_DEFAULT;
GetString(temp, STR_NETWORK_ERR_LEFT, lastof(temp));
snprintf(message, sizeof(message), "*** %s %s (%s)", name, temp, buf);
break;
@@ -651,7 +651,7 @@ void NetworkCloseClient(NetworkTCPSocketHandler *cs)
GetNetworkErrorMsg(str, errorno, lastof(str));
- NetworkTextMessage(NETWORK_ACTION_LEAVE, 1, false, client_name, "%s", str);
+ NetworkTextMessage(NETWORK_ACTION_LEAVE, CC_DEFAULT, false, client_name, "%s", str);
// Inform other clients of this... strange leaving ;)
FOR_ALL_CLIENTS(new_cs) {