From fb33819d98bdc00020ca20e19c9388f4fd2a76d3 Mon Sep 17 00:00:00 2001 From: Londiuh Date: Sun, 30 Jul 2023 01:08:07 +0200 Subject: [PATCH] fix(session): sctv spectator not being enabled (#1887) --- src/core/scr_globals.hpp | 1 + src/util/session.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/scr_globals.hpp b/src/core/scr_globals.hpp index 0f4c2874..f311e05d 100644 --- a/src/core/scr_globals.hpp +++ b/src/core/scr_globals.hpp @@ -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); diff --git a/src/util/session.hpp b/src/util/session.hpp index feda725f..96b3c96f 100644 --- a/src/util/session.hpp +++ b/src/util/session.hpp @@ -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() = (session == eSessionType::SC_TV ? 1 : 0); // If SCTV then enable spectator mode + *scr_globals::sctv_spectator.as() = (session == eSessionType::SC_TV ? 1 : 0); // If SCTV then enable spectator mode if (session == eSessionType::LEAVE_ONLINE) *script_global(1574589).at(2).as() = -1;