mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2026-10-11 09:48:03 +08:00
* feat(Spoofing): add spoofing * feat(Spoofing): prepare code for player attach * remove(PlayerAttach): isn't going to work due to netsync architecture * fix(GUI): fix scaling * feat(Project): add clang-format file * feat(Classes): update classes * fix(BlackHole): remove unnecessary cleanup * fix(Formatting): fix formatting for initializer lists * feat(clang-format): Set tab width and 1 space before comment Co-authored-by: Yimura <[email protected]>
37 lines
1.1 KiB
C++
37 lines
1.1 KiB
C++
#include "backend/looped/looped.hpp"
|
|
#include "gta_util.hpp"
|
|
#include "natives.hpp"
|
|
#include "pointers.hpp"
|
|
#include "util/session.hpp"
|
|
|
|
namespace big
|
|
{
|
|
static bool bLastForceThunderEnabled = false;
|
|
|
|
void looped::session_force_thunder()
|
|
{
|
|
bool used = g.session.force_thunder && *g_pointers->m_is_session_started;
|
|
if (!bLastForceThunderEnabled && used)
|
|
{
|
|
if (!STREAMING::IS_PLAYER_SWITCH_IN_PROGRESS() && gta_util::find_script_thread(RAGE_JOAAT("freemode")) && SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(RAGE_JOAAT("maintransition")) == 0)
|
|
{
|
|
session::set_fm_event_index(9);
|
|
session::set_fm_event_index(10);
|
|
session::set_fm_event_index(11);
|
|
bLastForceThunderEnabled = true;
|
|
}
|
|
}
|
|
else if (bLastForceThunderEnabled && !used)
|
|
{
|
|
if (*g_pointers->m_is_session_started && !STREAMING::IS_PLAYER_SWITCH_IN_PROGRESS() && gta_util::find_script_thread(RAGE_JOAAT("freemode")))
|
|
{
|
|
session::clear_fm_event_index(9);
|
|
session::clear_fm_event_index(10);
|
|
session::clear_fm_event_index(11);
|
|
}
|
|
|
|
bLastForceThunderEnabled = false;
|
|
}
|
|
}
|
|
}
|