(svn r14709) -Codechange: make a clearer distinction between 'unique' client identification ids and the indices into the clients/client info arrays.

This commit is contained in:
rubidium
2008-12-22 12:59:31 +00:00
parent 415d5abc54
commit 6d23f48bb6
15 changed files with 191 additions and 187 deletions

View File

@@ -259,7 +259,7 @@ static void SendChat(const char *buf, DestType type, int dest)
if (!_network_server) {
SEND_COMMAND(PACKET_CLIENT_CHAT)((NetworkAction)(NETWORK_ACTION_CHAT + type), type, dest, buf);
} else {
NetworkServerSendChat((NetworkAction)(NETWORK_ACTION_CHAT + type), type, dest, buf, NETWORK_SERVER_INDEX);
NetworkServerSendChat((NetworkAction)(NETWORK_ACTION_CHAT + type), type, dest, buf, CLIENT_ID_SERVER);
}
}
@@ -301,7 +301,7 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
/* First, try clients */
if (*item < MAX_CLIENT_INFO) {
/* Skip inactive clients */
while (_network_client_info[*item].client_index == NETWORK_EMPTY_INDEX && *item < MAX_CLIENT_INFO) (*item)++;
while (_network_client_info[*item].client_id == INVALID_CLIENT_ID && *item < MAX_CLIENT_INFO) (*item)++;
if (*item < MAX_CLIENT_INFO) return _network_client_info[*item].client_name;
}