fix(clang-format): enforce braces

This commit is contained in:
maybegreat48 2024-09-23 12:55:44 -04:00
parent a71ca03d6a
commit bb3ee3bd0c
2 changed files with 15 additions and 0 deletions

View File

@ -33,6 +33,7 @@ IncludeBlocks: Regroup
IndentCaseLabels: 'false'
IndentPPDirectives: BeforeHash
IndentWidth: '4'
InsertBraces: true
TabWidth: 4
IndentWrappedFunctionNames: 'true'
KeepEmptyLinesAtTheStartOfBlocks: 'false'

View File

@ -103,9 +103,11 @@ namespace big
{
LOGF(WARNING, "BattlEye wants us to kick {} for {}", plyr->get_name(), reason);
if (!plyr->tampered_with_be)
{
session::add_infraction(plyr, Infraction::TRIGGERED_ANTICHEAT);
}
}
}
void battleye_service::script_func()
{
@ -141,8 +143,10 @@ namespace big
{
std::lock_guard lock(m_mutex);
if (is_running() && !m_battleye_api.m_run())
{
LOG(WARNING) << "BE::Run failed";
}
}
std::this_thread::yield();
}
@ -162,7 +166,9 @@ namespace big
std::lock_guard lock(m_mutex);
if (is_running())
{
return;
}
auto handle = LoadLibraryA("BattlEye\\BEServer_x64.dll");
@ -201,7 +207,9 @@ namespace big
std::lock_guard lock(m_mutex);
if (!is_running())
{
return;
}
m_battleye_api.m_shutdown();
memset(&m_battleye_api, 0, sizeof(CApi));
@ -212,7 +220,9 @@ namespace big
std::lock_guard lock(m_mutex);
if (!is_running() || !g_player_service->get_self()->is_host())
{
return;
}
char string[32]{};
@ -230,7 +240,9 @@ namespace big
std::lock_guard lock(m_mutex);
if (!is_running())
{
return;
}
m_battleye_api.m_set_player_state(token, -1);
}
@ -240,7 +252,9 @@ namespace big
std::lock_guard lock(m_mutex);
if (!is_running())
{
return;
}
m_battleye_api.m_receive_message(token, const_cast<const void*>(message), size);
}