clientinfo *getinfo(int n) { if(n < MAXCLIENTS) return (clientinfo *)getclientinfo(n); return NULL; // TODO: If we want bots // n -= MAXCLIENTS; // return bots.inrange(n) ? bots[n] : NULL; }
bool allowbroadcast(int n) { conoutf("game::allowbroadcast"); CubeJSrv::SvClientInfo *ci = (CubeJSrv::SvClientInfo*)getclientinfo(n); return ci && ci->isConnected() && ci->getType() == CubeJ::CLIENT_TYPE_HEAD; }