Auto party friend
This commit is contained in:
parent
8aa3c8765d
commit
43f068c659
21
src/irc.cpp
21
src/irc.cpp
@ -6,6 +6,7 @@
|
|||||||
#include "ChIRC.hpp"
|
#include "ChIRC.hpp"
|
||||||
#include "hack.hpp"
|
#include "hack.hpp"
|
||||||
#include "ucccccp.hpp"
|
#include "ucccccp.hpp"
|
||||||
|
#include "PlayerTools.hpp"
|
||||||
|
|
||||||
namespace IRC
|
namespace IRC
|
||||||
{
|
{
|
||||||
@ -320,8 +321,25 @@ CatCommand debug_steamids("debug_steamids", "Debug steamids", []() {
|
|||||||
logging::Info("%u", i.second.steamid);
|
logging::Info("%u", i.second.steamid);
|
||||||
});
|
});
|
||||||
static Timer resize_party{};
|
static Timer resize_party{};
|
||||||
|
static Timer pass_leader{};
|
||||||
|
static Timer friend_party_t{};
|
||||||
|
void friend_party()
|
||||||
|
{
|
||||||
|
if (friend_party_t.test_and_set(10000))
|
||||||
|
{
|
||||||
|
re::CTFPartyClient *pc = re::CTFPartyClient::GTFPartyClient();
|
||||||
|
if (pc)
|
||||||
|
{
|
||||||
|
std::vector<unsigned> valid_steam_ids = pc->GetPartySteamIDs();
|
||||||
|
for (auto steamid : valid_steam_ids)
|
||||||
|
if (steamid && player_tools::shouldTargetSteamId(steamid))
|
||||||
|
playerlist::AccessData(steamid).state = playerlist::k_EState::CAT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
void party_leader_pass()
|
void party_leader_pass()
|
||||||
|
{
|
||||||
|
if (pass_leader.test_and_set(10000))
|
||||||
{
|
{
|
||||||
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
|
||||||
re::CTFPartyClient *pc = re::CTFPartyClient::GTFPartyClient();
|
re::CTFPartyClient *pc = re::CTFPartyClient::GTFPartyClient();
|
||||||
@ -352,6 +370,7 @@ void party_leader_pass()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void run()
|
static void run()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user