mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-07-04 05:02:58 +08:00
Orbital Drone Feature (#1148)
* Orbital Drone Feature * Fixed PR review comments * chore: cleanup code * UI & globals saving * Fixed typo * Fixed noclip conflict & Applied review suggestions & Added another changeable variable --------- Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
@ -5,8 +5,10 @@
|
||||
#include "script.hpp"
|
||||
#include "script_patches.hpp"
|
||||
#include "services/context_menu/context_menu_service.hpp"
|
||||
#include "services/orbital_drone/orbital_drone.hpp"
|
||||
#include "thread_pool.hpp"
|
||||
|
||||
|
||||
namespace big
|
||||
{
|
||||
void backend::loop()
|
||||
@ -186,4 +188,22 @@ namespace big
|
||||
script::get_current()->yield();
|
||||
}
|
||||
}
|
||||
|
||||
void backend::orbital_drone()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (g.world.orbital_drone.enabled && PAD::IS_CONTROL_JUST_PRESSED(2, (int)ControllerInputs::INPUT_VEH_LOOK_BEHIND))
|
||||
{
|
||||
if (!g_orbital_drone_service.initialized())
|
||||
g_orbital_drone_service.init();
|
||||
else
|
||||
g_orbital_drone_service.destroy();
|
||||
}
|
||||
|
||||
g_orbital_drone_service.tick();
|
||||
|
||||
script::get_current()->yield();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user