diff --git a/src/backend/backend.cpp b/src/backend/backend.cpp index c543a9a1..84a77fae 100644 --- a/src/backend/backend.cpp +++ b/src/backend/backend.cpp @@ -7,6 +7,7 @@ #include "services/context_menu/context_menu_service.hpp" #include "services/custom_teleport/custom_teleport_service.hpp" #include "services/orbital_drone/orbital_drone.hpp" +#include "services/ped_animations/ped_animations_service.hpp" #include "services/script_connection/script_connection_service.hpp" #include "services/squad_spawner/squad_spawner.hpp" #include "services/tunables/tunables_service.hpp" @@ -27,6 +28,7 @@ namespace big g_squad_spawner_service.fetch_squads(); g_xml_vehicles_service->fetch_xml_files(); g_custom_teleport_service.fetch_saved_locations(); + g_ped_animation_service.fetch_saved_animations(); while (g_running) { @@ -59,6 +61,16 @@ namespace big } } + void backend::ambient_animations_loop() + { + while (g_running) + { + g_ped_animation_service.ambient_animations_prompt_tick(); + + script::get_current()->yield(); + } + } + void backend::weapons_loop() { LOG(INFO) << "Starting script: Weapons"; diff --git a/src/backend/backend.hpp b/src/backend/backend.hpp index 7ebd8a38..c8b195a1 100644 --- a/src/backend/backend.hpp +++ b/src/backend/backend.hpp @@ -8,6 +8,7 @@ namespace big public: static void loop(); static void self_loop(); + static void ambient_animations_loop(); static void weapons_loop(); static void vehicles_loop(); static void misc_loop(); diff --git a/src/backend/looped/system/self_globals.cpp b/src/backend/looped/system/self_globals.cpp index f710070a..b7a49620 100644 --- a/src/backend/looped/system/self_globals.cpp +++ b/src/backend/looped/system/self_globals.cpp @@ -18,6 +18,8 @@ namespace big self::pos = ENTITY::GET_ENTITY_COORDS(self::ped, false /*Unused*/); + self::rot = ENTITY::GET_ENTITY_ROTATION(self::ped, 2); + if (PED::IS_PED_IN_ANY_VEHICLE(self::ped, 0)) { self::veh = PED::GET_VEHICLE_PED_IS_IN(self::ped, false); diff --git a/src/common.hpp b/src/common.hpp index 87efa0cd..dd5df83a 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -80,6 +80,7 @@ namespace self inline Ped ped; inline Player id; inline Vector3 pos; + inline Vector3 rot; inline Vehicle veh; } diff --git a/src/core/settings.hpp b/src/core/settings.hpp index 2ac2e9d8..bdf4e7e8 100644 --- a/src/core/settings.hpp +++ b/src/core/settings.hpp @@ -305,45 +305,47 @@ namespace big NLOHMANN_DEFINE_TYPE_INTRUSIVE(ipls, select) } ipls{}; - bool clean_player = false; - bool force_wanted_level = false; - bool free_cam = false; - bool invisibility = false; - bool local_visibility = true; - bool never_wanted = false; - bool no_ragdoll = false; - bool noclip = false; + bool clean_player = false; + bool force_wanted_level = false; + bool free_cam = false; + bool invisibility = false; + bool local_visibility = true; + bool never_wanted = false; + bool no_ragdoll = false; + bool noclip = false; float noclip_aim_speed_multiplier = 0.25f; float noclip_speed_multiplier = 20.f; - bool off_radar = false; - bool ghost_org = false; - bool super_run = false; - bool no_collision = false; - bool unlimited_oxygen = false; - bool no_water_collision = false; - int wanted_level = 0; - bool god_mode = false; - bool part_water = false; - bool proof_bullet = false; - bool proof_fire = false; - bool proof_collision = false; - bool proof_melee = false; - bool proof_explosion = false; - bool proof_steam = false; - bool proof_drown = false; - bool proof_water = false; - uint32_t proof_mask = 0; - bool mobile_radio = false; - bool fast_respawn = false; - bool auto_tp = false; - bool super_jump = false; - bool beast_jump = false; - bool healthregen = false; - float healthregenrate = 1.0f; - bool superman = false; - bool custom_weapon_stop = true; - std::string persist_outfit = ""; - bool persist_outfits_mis = false; + bool off_radar = false; + bool ghost_org = false; + bool super_run = false; + bool no_collision = false; + bool unlimited_oxygen = false; + bool no_water_collision = false; + int wanted_level = 0; + bool god_mode = false; + bool part_water = false; + bool proof_bullet = false; + bool proof_fire = false; + bool proof_collision = false; + bool proof_melee = false; + bool proof_explosion = false; + bool proof_steam = false; + bool proof_drown = false; + bool proof_water = false; + uint32_t proof_mask = 0; + bool mobile_radio = false; + bool fast_respawn = false; + bool auto_tp = false; + bool super_jump = false; + bool beast_jump = false; + bool healthregen = false; + float healthregenrate = 1.0f; + bool superman = false; + bool custom_weapon_stop = true; + bool prompt_ambient_animations = false; + std::string persist_outfit = ""; + bool persist_outfits_mis = false; + struct hud { bool color_override = false; @@ -363,7 +365,7 @@ namespace big // do not save below entries bool dance_mode = false; - NLOHMANN_DEFINE_TYPE_INTRUSIVE(self, ipls, ptfx_effects, clean_player, force_wanted_level, free_cam, invisibility, local_visibility, never_wanted, no_ragdoll, noclip, noclip_aim_speed_multiplier, noclip_speed_multiplier, off_radar, super_run, no_collision, unlimited_oxygen, no_water_collision, wanted_level, god_mode, part_water, proof_bullet, proof_fire, proof_collision, proof_melee, proof_explosion, proof_steam, proof_drown, proof_water, proof_mask, mobile_radio, fast_respawn, auto_tp, super_jump, beast_jump, healthregen, healthregenrate, hud, superman, custom_weapon_stop, persist_outfit, persist_outfits_mis) + NLOHMANN_DEFINE_TYPE_INTRUSIVE(self, ipls, ptfx_effects, clean_player, force_wanted_level, free_cam, invisibility, local_visibility, never_wanted, no_ragdoll, noclip, noclip_aim_speed_multiplier, noclip_speed_multiplier, off_radar, super_run, no_collision, unlimited_oxygen, no_water_collision, wanted_level, god_mode, part_water, proof_bullet, proof_fire, proof_collision, proof_melee, proof_explosion, proof_steam, proof_drown, proof_water, proof_mask, mobile_radio, fast_respawn, auto_tp, super_jump, beast_jump, healthregen, healthregenrate, hud, superman, custom_weapon_stop, prompt_ambient_animations, persist_outfit, persist_outfits_mis) } self{}; struct session diff --git a/src/main.cpp b/src/main.cpp index e4242ba1..a00ee8b2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -127,6 +127,7 @@ BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID) g_script_mgr.add_script(std::make_unique