(svn r6820) -Codechange: Some more const correctness, coding style.

-Codechange: Add FOR_ALL_ACTIVE_CLIENT_INFOS macro that will loop all clients
 skipping inactive ones.
This commit is contained in:
Darkvater
2006-10-18 13:17:46 +00:00
parent ccc1ad52d9
commit 68314cf576
4 changed files with 18 additions and 28 deletions

View File

@@ -198,7 +198,8 @@ NetworkClientState _clients[MAX_CLIENTS];
#define SEND_COMMAND(type) NetworkPacketSend_ ## type ## _command
#define RECEIVE_COMMAND(type) NetworkPacketReceive_ ## type ## _command
#define FOR_ALL_CLIENTS(cs) for (cs = _clients; cs != &_clients[MAX_CLIENTS] && cs->socket != INVALID_SOCKET; cs++)
#define FOR_ALL_CLIENTS(cs) for (cs = _clients; cs != endof(_clients) && cs->socket != INVALID_SOCKET; cs++)
#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)
Packet *NetworkSend_Init(PacketType type);
void NetworkSend_uint8(Packet *packet, uint8 data);