iw4x-client/src/Components/Modules/Party.hpp

41 lines
927 B
C++
Raw Normal View History

2015-12-25 15:42:35 -05:00
namespace Components
{
class Party : public Component
{
public:
Party();
~Party();
const char* GetName() { return "Party"; };
2016-01-01 20:28:09 -05:00
static Network::Address Target();
2015-12-25 15:42:35 -05:00
static void Connect(Network::Address target);
2015-12-26 21:56:00 -05:00
static const char* GetLobbyInfo(SteamID lobby, std::string key);
static void RemoveLobby(SteamID lobby);
2015-12-25 15:42:35 -05:00
2016-01-01 20:28:09 -05:00
static bool PlaylistAwaiting();
static void PlaylistContinue();
2015-12-25 15:42:35 -05:00
private:
struct JoinContainer
{
Network::Address Target;
std::string Challenge;
DWORD JoinTime;
bool Valid;
2016-01-01 20:28:09 -05:00
// Party-specific stuff
DWORD RequestTime;
bool AwaitingPlaylist;
2015-12-25 15:42:35 -05:00
};
static JoinContainer Container;
2015-12-26 21:56:00 -05:00
static std::map<uint64_t, Network::Address> LobbyMap;
static SteamID GenerateLobbyId();
2015-12-27 09:39:49 -05:00
static Game::dvar_t* RegisterMinPlayers(const char* name, int value, int min, int max, Game::dvar_flag flag, const char* description);
static void ConnectError(std::string message);
2015-12-25 15:42:35 -05:00
};
}