An ACS library for ZDoom-based ports
int PickRandomTeamPlayer(int team)
Returns the number of a random player that isn't spectating and belongs to the team.