src/network/network.c
changeset 5569 d89d1235add5
parent 5524 93460e0fed07
equal deleted inserted replaced
5568:4198790648e0 5569:d89d1235add5
    79 // Function that looks up the CS for a given client-index
    79 // Function that looks up the CS for a given client-index
    80 NetworkClientState *NetworkFindClientStateFromIndex(uint16 client_index)
    80 NetworkClientState *NetworkFindClientStateFromIndex(uint16 client_index)
    81 {
    81 {
    82 	NetworkClientState *cs;
    82 	NetworkClientState *cs;
    83 
    83 
    84 	for (cs = _clients; cs != &_clients[MAX_CLIENT_INFO]; cs++) {
    84 	for (cs = _clients; cs != endof(_clients); cs++) {
    85 		if (cs->index == client_index) return cs;
    85 		if (cs->index == client_index) return cs;
    86 	}
    86 	}
    87 
    87 
    88 	return NULL;
    88 	return NULL;
    89 }
    89 }