summaryrefslogtreecommitdiff
path: root/src/network/network_func.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-22 12:59:31 +0000
committerrubidium <rubidium@openttd.org>2008-12-22 12:59:31 +0000
commit6d23f48bb6b9f5e9ae9c7568a0acdf3c206dbabc (patch)
treebb6d8bbfd056eeed669e31e87f2c987bc038a42a /src/network/network_func.h
parent415d5abc54acd87a16f22201a84020734c728ee5 (diff)
downloadopenttd-6d23f48bb6b9f5e9ae9c7568a0acdf3c206dbabc.tar.xz
(svn r14709) -Codechange: make a clearer distinction between 'unique' client identification ids and the indices into the clients/client info arrays.
Diffstat (limited to 'src/network/network_func.h')
-rw-r--r--src/network/network_func.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/network/network_func.h b/src/network/network_func.h
index 13e45232d..cacf643f6 100644
--- a/src/network/network_func.h
+++ b/src/network/network_func.h
@@ -14,8 +14,8 @@ extern NetworkServerGameInfo _network_game_info;
extern NetworkCompanyInfo _network_company_info[MAX_COMPANIES];
extern NetworkClientInfo _network_client_info[MAX_CLIENT_INFO];
-extern uint16 _network_own_client_index;
-extern uint16 _redirect_console_to_client;
+extern ClientID _network_own_client_id;
+extern ClientID _redirect_console_to_client;
extern bool _network_need_advertise;
extern uint32 _network_last_advertise_frame;
extern uint8 _network_reconnect;
@@ -36,7 +36,7 @@ void ParseConnectionString(const char **company, const char **port, char *connec
void NetworkStartDebugLog(const char *hostname, uint16 port);
void NetworkPopulateCompanyInfo();
-void NetworkUpdateClientInfo(uint16 client_index);
+void NetworkUpdateClientInfo(ClientID client_id);
bool NetworkClientConnectGame(const char *host, uint16 port);
void NetworkClientSendRcon(const char *password, const char *command);
void NetworkClientSendChat(NetworkAction action, DestType type, int dest, const char *msg);
@@ -49,20 +49,20 @@ void NetworkServerChangeOwner(Owner current_owner, Owner new_owner);
void NetworkServerShowStatusToConsole();
bool NetworkServerStart();
-NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index);
+NetworkClientInfo *NetworkFindClientInfoFromIndex(ClientID client_id);
NetworkClientInfo *NetworkFindClientInfoFromIP(const char *ip);
const char* GetClientIP(const NetworkClientInfo *ci);
-void NetworkServerSendRcon(uint16 client_index, ConsoleColour colour_code, const char *string);
-void NetworkServerSendError(uint16 client_index, NetworkErrorCode error);
-void NetworkServerSendChat(NetworkAction action, DestType type, int dest, const char *msg, uint16 from_index);
+void NetworkServerSendRcon(ClientID client_id, ConsoleColour colour_code, const char *string);
+void NetworkServerSendError(ClientID client_id, NetworkErrorCode error);
+void NetworkServerSendChat(NetworkAction action, DestType type, int dest, const char *msg, ClientID from_id);
void NetworkInitChatMessage();
void CDECL NetworkAddChatMessage(uint16 color, uint8 duration, const char *message, ...);
void NetworkUndrawChatMessage();
void NetworkChatMessageDailyLoop();
-#define FOR_ALL_ACTIVE_CLIENT_INFOS(ci) for (ci = _network_client_info; ci != endof(_network_client_info); ci++) if (ci->client_index != NETWORK_EMPTY_INDEX)
+#define FOR_ALL_ACTIVE_CLIENT_INFOS(ci) for (ci = _network_client_info; ci != endof(_network_client_info); ci++) if (ci->client_id != INVALID_CLIENT_ID)
#endif /* ENABLE_NETWORK */
#endif /* NETWORK_FUNC_H */