2015-12-25 15:42:35 -05:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Party : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Party();
|
2016-08-15 10:40:30 -04:00
|
|
|
~Party();
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
2015-12-25 15:42:35 -05:00
|
|
|
const char* GetName() { return "Party"; };
|
2016-08-15 10:40:30 -04:00
|
|
|
#endif
|
2015-12-25 15:42:35 -05:00
|
|
|
|
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();
|
2016-01-03 09:14:44 -05:00
|
|
|
static void PlaylistError(std::string error);
|
2016-01-01 20:28:09 -05:00
|
|
|
|
2016-08-31 11:54:08 -04:00
|
|
|
static void ConnectError(std::string message);
|
|
|
|
|
2015-12-25 15:42:35 -05:00
|
|
|
private:
|
2016-06-30 13:38:48 -04:00
|
|
|
class JoinContainer
|
2015-12-25 15:42:35 -05:00
|
|
|
{
|
2016-06-30 13:38:48 -04:00
|
|
|
public:
|
2015-12-25 15:42:35 -05:00
|
|
|
Network::Address Target;
|
|
|
|
std::string Challenge;
|
|
|
|
DWORD JoinTime;
|
|
|
|
bool Valid;
|
2016-08-31 11:54:08 -04:00
|
|
|
int MatchType;
|
|
|
|
|
|
|
|
Utils::InfoString Info;
|
2016-01-01 20:28:09 -05:00
|
|
|
|
|
|
|
// Party-specific stuff
|
|
|
|
DWORD RequestTime;
|
2016-08-31 11:54:08 -04:00
|
|
|
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);
|
|
|
|
|
2016-01-02 20:37:06 -05:00
|
|
|
static DWORD UIDvarIntStub(char* dvar);
|
2015-12-25 15:42:35 -05:00
|
|
|
};
|
|
|
|
}
|