mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-23 04:27:25 +08:00
fix(self menu gui): fix self menu erroring when not yet in the game but still in the main menu / first loading screen (#2235)
This commit is contained in:
parent
7689d0e11c
commit
b43dfc82f8
@ -30,7 +30,8 @@ namespace big
|
||||
|
||||
components::command_checkbox<"godmode">();
|
||||
components::command_checkbox<"otr">();
|
||||
if (g.self.off_radar && scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[self::id].BossGoon.Boss == self::id)
|
||||
const auto gpbd_fm_3 = scr_globals::gpbd_fm_3.as<GPBD_FM_3*>();
|
||||
if (g.self.off_radar && *g_pointers->m_gta.m_is_session_started && gpbd_fm_3->Entries[self::id].BossGoon.Boss == self::id)
|
||||
components::command_checkbox<"ghostorg">();
|
||||
components::command_checkbox<"freecam">();
|
||||
components::command_checkbox<"nophone">();
|
||||
@ -40,11 +41,13 @@ namespace big
|
||||
if (g.self.invisibility)
|
||||
components::command_checkbox<"localvis">(); // TODO: does nothing in SP
|
||||
|
||||
ImGui::BeginDisabled(scr_globals::gpbd_fm_3.as<GPBD_FM_3*>()->Entries[self::id].BossGoon.Boss != -1
|
||||
|| gta_util::find_script_thread(RAGE_JOAAT("fm_mission_controller"))
|
||||
|| gta_util::find_script_thread(RAGE_JOAAT("fm_mission_controller_2020")));
|
||||
|
||||
components::command_checkbox<"passive">();
|
||||
// clang-format off
|
||||
ImGui::BeginDisabled(!*g_pointers->m_gta.m_is_session_started ||
|
||||
gpbd_fm_3->Entries[self::id].BossGoon.Boss != -1 ||
|
||||
gta_util::find_script_thread(RAGE_JOAAT("fm_mission_controller")) ||
|
||||
gta_util::find_script_thread(RAGE_JOAAT("fm_mission_controller_2020")));
|
||||
// clang-format on
|
||||
components::command_checkbox<"passive">();
|
||||
ImGui::EndDisabled();
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
Loading…
Reference in New Issue
Block a user