コード例 #1
0
ファイル: server.cpp プロジェクト: bedna-KU/OF-Engine
    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;
    }
コード例 #2
0
ファイル: stubs.cpp プロジェクト: offtools/cubej
    bool allowbroadcast(int n) {
        conoutf("game::allowbroadcast");
		CubeJSrv::SvClientInfo *ci = (CubeJSrv::SvClientInfo*)getclientinfo(n);
        return ci && ci->isConnected() && ci->getType() == CubeJ::CLIENT_TYPE_HEAD;
	}