All pastes #400039 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-18 13:05 UTC
rendered paste body
int count1, count2;
		int availableNickIDs[MAX_CLIENTS];
		for (count1 = 0, count2 = 0; count1 < MAX_CLIENTS; count1++) {
			if (eth.clientInfo[count1].infoValid)
				availableNickIDs[count2++] = count1;
		}
		count2--;
		if (count2 > 0)
			strncpy(eth.clientInfo[eth.cg_clientNum].name, eth.clientInfo[availableNickIDs[rand() % count2]].name, sizeof(eth.clientInfo->name));
		else
			return qfalse;