2022-12-06 16:12:02 +00:00
|
|
|
#include "backend/looped/looped.hpp"
|
|
|
|
#include "fiber_pool.hpp"
|
|
|
|
#include "natives.hpp"
|
|
|
|
#include "script.hpp"
|
|
|
|
#include "pointers.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
bool bLastAutoTP = false;
|
|
|
|
void looped::system_auto_tp()
|
|
|
|
{
|
|
|
|
bool temp_disable_tp = (!*g_pointers->m_is_session_started) && CUTSCENE::IS_CUTSCENE_ACTIVE();
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
if ((!g.self.auto_tp || temp_disable_tp) && bLastAutoTP)
|
2022-12-06 16:12:02 +00:00
|
|
|
{
|
|
|
|
MISC::USING_MISSION_CREATOR(false);
|
|
|
|
MISC::ALLOW_MISSION_CREATOR_WARP(false);
|
|
|
|
}
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
if (g.self.auto_tp && !temp_disable_tp)
|
2022-12-06 16:12:02 +00:00
|
|
|
{
|
|
|
|
MISC::USING_MISSION_CREATOR(true);
|
|
|
|
MISC::ALLOW_MISSION_CREATOR_WARP(true);
|
|
|
|
}
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
bLastAutoTP = g.self.auto_tp;
|
2022-12-06 16:12:02 +00:00
|
|
|
}
|
|
|
|
}
|