2021-08-05 01:26:23 +02:00
|
|
|
#pragma once
|
|
|
|
#include "core/data/session_types.hpp"
|
|
|
|
#include "script_global.hpp"
|
|
|
|
#include "script.hpp"
|
2022-03-21 17:06:16 -04:00
|
|
|
#include "natives.hpp"
|
2021-08-05 01:26:23 +02:00
|
|
|
|
|
|
|
namespace big::session
|
|
|
|
{
|
|
|
|
void join_type(SessionType session)
|
|
|
|
{
|
2022-08-14 18:19:15 +08:00
|
|
|
*script_global(2726795).as<int*>() = (session.id == eSessionType::SC_TV ? 1 : 0); // If SC TV Then Enable Spectator Mode
|
|
|
|
|
2021-08-05 01:26:23 +02:00
|
|
|
if (session.id == eSessionType::LEAVE_ONLINE)
|
2022-05-03 09:02:18 -04:00
|
|
|
*script_global(1574589).at(2).as<int*>() = -1;
|
2021-08-05 01:26:23 +02:00
|
|
|
else
|
2022-07-27 14:39:22 +02:00
|
|
|
*script_global(1575015).as<int*>() = (int)session.id;
|
2021-08-05 01:26:23 +02:00
|
|
|
|
2022-05-03 09:02:18 -04:00
|
|
|
*script_global(1574589).as<int*>() = 1;
|
2021-08-05 01:26:23 +02:00
|
|
|
script::get_current()->yield(200ms);
|
2022-05-03 09:02:18 -04:00
|
|
|
*script_global(1574589).as<int*>() = 0;
|
2021-08-05 01:26:23 +02:00
|
|
|
}
|
2022-03-21 17:06:16 -04:00
|
|
|
|
|
|
|
static constexpr char const* weathers[] = { "EXTRASUNNY", "CLEAR", "CLOUDS", "SMOG", "FOGGY", "OVERCAST", "RAIN", "THUNDER", "CLEARING", "NEUTRAL", "SNOW", "BLIZZARD", "SNOWLIGHT", "XMAS", "HALLOWEEN" };
|
|
|
|
|
|
|
|
void local_weather()
|
|
|
|
{
|
|
|
|
MISC::CLEAR_OVERRIDE_WEATHER();
|
|
|
|
|
|
|
|
MISC::SET_OVERRIDE_WEATHER(weathers[g->session.local_weather]);
|
|
|
|
|
|
|
|
*script_global(262145).at(4723).as<bool*>() = g->session.local_weather == 13;
|
|
|
|
}
|
2021-08-05 01:26:23 +02:00
|
|
|
}
|