fix(session): sctv spectator not being enabled (#1887)

This commit is contained in:
Londiuh 2023-07-30 01:08:07 +02:00 committed by GitHub
parent 0e0b4d46a4
commit fb33819d98
2 changed files with 2 additions and 1 deletions

View File

@ -29,6 +29,7 @@ namespace big::scr_globals
static inline const script_global in_multiplayer(78689); // g_bInMultiplayer
static inline const script_global transition_state(1574996);
static inline const script_global sctv_spectator(2695969); // pausemenu_multiplayer function 0xE49C42EC
static inline const script_global vehicle_global(1586488);
static inline const script_global mechanic_global(2794162);

View File

@ -42,7 +42,7 @@ namespace big::session
while (!SCRIPT::HAS_SCRIPT_WITH_NAME_HASH_LOADED(RAGE_JOAAT("pausemenu_multiplayer")))
script::get_current()->yield();
*script_global(2695915).as<int*>() = (session == eSessionType::SC_TV ? 1 : 0); // If SCTV then enable spectator mode
*scr_globals::sctv_spectator.as<int*>() = (session == eSessionType::SC_TV ? 1 : 0); // If SCTV then enable spectator mode
if (session == eSessionType::LEAVE_ONLINE)
*script_global(1574589).at(2).as<int*>() = -1;