clang format

This commit is contained in:
LightCat 2018-10-08 18:45:17 +02:00
parent 03f74192d5
commit 52c35ad2ff
2 changed files with 24 additions and 15 deletions

View File

@ -165,7 +165,8 @@ CachedEntity *NearestEnemy()
ent->m_iTeam() == LOCAL_E->m_iTeam())
continue;
float scr = ent->m_flDistance();
if (g_pPlayerResource->GetClass(ent) == tf_engineer || g_pPlayerResource->GetClass(ent) == tf_heavy)
if (g_pPlayerResource->GetClass(ent) == tf_engineer ||
g_pPlayerResource->GetClass(ent) == tf_heavy)
scr *= 5.0f;
if (g_pPlayerResource->GetClass(ent) == tf_pyro)
scr *= 7.0f;
@ -361,9 +362,11 @@ bool NavToEnemy()
{
int nearestvalid{};
if (!*heavy_mode)
nearestvalid = nav::FindNearestValidbyDist(ent->m_vecOrigin(), 2000, 6000);
nearestvalid =
nav::FindNearestValidbyDist(ent->m_vecOrigin(), 2000, 6000);
else
nearestvalid = nav::FindNearestValidbyDist(ent->m_vecOrigin(), 200, 1000);
nearestvalid =
nav::FindNearestValidbyDist(ent->m_vecOrigin(), 200, 1000);
if (nearestvalid != -1)
{
auto area = nav::areas[nearestvalid];

View File

@ -130,7 +130,9 @@ void cc_party(std::string &msg)
}
else if (answer_steam && msg.find("cc_partysteam") == 0)
{
irc.privmsg(format("cc_partysteamrep", g_ISteamUser->GetSteamID().GetAccountID()), true);
irc.privmsg(format("cc_partysteamrep",
g_ISteamUser->GetSteamID().GetAccountID()),
true);
}
}
void cc_cmd(std::string &msg)
@ -250,11 +252,14 @@ static HookedFunction paint(HookedFunctions_types::HF_Paint, "IRC", 16, []() {
idx = i;
}
if (idx != -1)
hack::command_stack().push(format("tf_party_request_join_user ", steamidvec[idx]));
hack::command_stack().push(
format("tf_party_request_join_user ", steamidvec[idx]));
}
}
if (irc_party && last_sent_steamid.test_and_set(*party_cooldown * 1000))
irc.privmsg(format("cc_partysteam", g_ISteamUser->GetSteamID().GetAccountID()), true);
irc.privmsg(format("cc_partysteam",
g_ISteamUser->GetSteamID().GetAccountID()),
true);
irc.Update();
}
});
@ -303,7 +308,8 @@ static CatCommand irc_exec_all("irc_exec_all", "Send command to C&C channel",
irc.privmsg(msg, true);
});
static CatCommand invite_all("irc_invite_all", "Inivte all people in C&C channel",
static CatCommand invite_all(
"irc_invite_all", "Inivte all people in C&C channel",
[](const CCommand &args) {
std::string msg("cc_cmdtf_party_request_join_user ");
msg.append(std::to_string(g_ISteamUser->GetSteamID().GetAccountID()));