All pastes #907693 Raw Edit

playeret

public text v1 · immutable
·published 2008-02-17 20:58 UTC
rendered paste body
bool isPlayer(int num)
{
	centity_t *cent;

	if( num > MAX_GENTITIES )
		return qfalse;

	cent = &cg_entities[num];

	if( cent->currentState.clientNum > MAX_CLIENTS || cent->currentState.clientNum == cg.clientNum )
		return qfalse;

	if( cent->currentState.eType != ET_PLAYER || !cent->currentValid || !cgs.clientinfo[num].infoValid )	
		return qfalse;

	return qtrue;
}