fix(session): hard lock when switching too early (#1678)
This commit is contained in:
parent
a2609bbdc6
commit
9d756f6936
@ -34,8 +34,15 @@ namespace big::session
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void join_type(eSessionType session)
|
inline bool join_type(eSessionType session)
|
||||||
{
|
{
|
||||||
|
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(RAGE_JOAAT("maintransition")) != 0 || STREAMING::IS_PLAYER_SWITCH_IN_PROGRESS())
|
||||||
|
{
|
||||||
|
g_notification_service->push_error("RID Joiner", "Player switch in progress, wait a bit.");
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
*script_global(2695915).as<int*>() = (session == eSessionType::SC_TV ? 1 : 0); // If SC TV Then Enable Spectator Mode
|
*script_global(2695915).as<int*>() = (session == eSessionType::SC_TV ? 1 : 0); // If SC TV Then Enable Spectator Mode
|
||||||
|
|
||||||
if (session == eSessionType::LEAVE_ONLINE)
|
if (session == eSessionType::LEAVE_ONLINE)
|
||||||
@ -46,6 +53,8 @@ namespace big::session
|
|||||||
*script_global(1574589).as<int*>() = 1;
|
*script_global(1574589).as<int*>() = 1;
|
||||||
script::get_current()->yield(200ms);
|
script::get_current()->yield(200ms);
|
||||||
*script_global(1574589).as<int*>() = 0;
|
*script_global(1574589).as<int*>() = 0;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void set_fm_event_index(int index)
|
inline void set_fm_event_index(int index)
|
||||||
|
Reference in New Issue
Block a user