feat: Some small additions (#755)

This commit is contained in:
Bugisoft 2022-12-30 02:09:33 +01:00 committed by GitHub
parent 5bc81ee724
commit 089bcebc17
10 changed files with 79 additions and 6 deletions

View File

@ -1,6 +1,7 @@
include(FetchContent) include(FetchContent)
set(BUILD_TESTING_BEFORE ${BUILD_TESTING}) set(BUILD_TESTING_BEFORE ${BUILD_TESTING})
set(CURL_DISABLE_TESTS OFF)
FetchContent_Declare( FetchContent_Declare(
cpr cpr
GIT_REPOSITORY https://github.com/libcpr/cpr.git GIT_REPOSITORY https://github.com/libcpr/cpr.git

View File

@ -633,10 +633,17 @@ namespace big
player_count_filter_minimum, player_count_filter_maximum, sort_method, sort_direction, replace_game_matchmaking) player_count_filter_minimum, player_count_filter_maximum, sort_method, sort_direction, replace_game_matchmaking)
} session_browser{}; } session_browser{};
struct ugc
{
bool infinite_model_memory;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(ugc, infinite_model_memory)
} ugc{};
NLOHMANN_DEFINE_TYPE_INTRUSIVE(menu_settings, NLOHMANN_DEFINE_TYPE_INTRUSIVE(menu_settings,
debug, tunables, notifications, player, protections, self, session, settings, spawn_vehicle, clone_pv, debug, tunables, notifications, player, protections, self, session, settings, spawn_vehicle, clone_pv,
spawn_ped, spoofing, vehicle, weapons, window, context_menu, esp, session_browser) spawn_ped, spoofing, vehicle, weapons, window, context_menu, esp, session_browser, ugc)
}; };
inline auto g = menu_settings(); inline auto g = menu_settings();

View File

@ -47,6 +47,12 @@ namespace rage
{ {
*reinterpret_cast<std::remove_cv_t<std::remove_reference_t<T>>*>(m_return_value) = std::forward<T>(value); *reinterpret_cast<std::remove_cv_t<std::remove_reference_t<T>>*>(m_return_value) = std::forward<T>(value);
} }
template <typename T>
void set_return_value(T& value)
{
*reinterpret_cast<std::remove_cv_t<std::remove_reference_t<T>>*>(m_return_value) = std::forward<T>(value);
}
protected: protected:
void *m_return_value; void *m_return_value;
std::uint32_t m_arg_count; std::uint32_t m_arg_count;

View File

@ -27,12 +27,13 @@ namespace big
void IS_DLC_PRESENT(rage::scrNativeCallContext* src) void IS_DLC_PRESENT(rage::scrNativeCallContext* src)
{ {
const auto hash = src->get_arg<rage::joaat_t>(0); const auto hash = src->get_arg<rage::joaat_t>(0);
bool return_value = DLC::IS_DLC_PRESENT(hash); BOOL return_value = DLC::IS_DLC_PRESENT(hash);
if (hash == 0x96F02EE6) if (hash == 0x96F02EE6)
return_value = return_value || g.settings.dev_dlc; return_value = return_value || g.settings.dev_dlc;
src->set_return_value(return_value); src->set_return_value<BOOL>(return_value);
} }
void NETWORK_SET_THIS_SCRIPT_IS_NETWORK_SCRIPT(rage::scrNativeCallContext* src) void NETWORK_SET_THIS_SCRIPT_IS_NETWORK_SCRIPT(rage::scrNativeCallContext* src)

View File

@ -35,5 +35,13 @@ namespace big
src->set_return_value<Hash>(std::move(model)); src->set_return_value<Hash>(std::move(model));
} }
void GET_USED_CREATOR_BUDGET(rage::scrNativeCallContext* src)
{
if (g.ugc.infinite_model_memory)
src->set_return_value<float>(0);
else
src->set_return_value<float>(STREAMING::GET_USED_CREATOR_BUDGET());
}
} }
} }

View File

@ -133,6 +133,13 @@ namespace big
add_native_detour(RAGE_JOAAT("fm_capture_creator"), 0x9F47B058362C84B5, creator::GET_ENTITY_MODEL); add_native_detour(RAGE_JOAAT("fm_capture_creator"), 0x9F47B058362C84B5, creator::GET_ENTITY_MODEL);
add_native_detour(RAGE_JOAAT("fm_deathmatch_creator"), 0x9F47B058362C84B5, creator::GET_ENTITY_MODEL); add_native_detour(RAGE_JOAAT("fm_deathmatch_creator"), 0x9F47B058362C84B5, creator::GET_ENTITY_MODEL);
add_native_detour(RAGE_JOAAT("fm_lts_creator"), 0x9F47B058362C84B5, creator::GET_ENTITY_MODEL); add_native_detour(RAGE_JOAAT("fm_lts_creator"), 0x9F47B058362C84B5, creator::GET_ENTITY_MODEL);
// Infinite Model Memory
add_native_detour(RAGE_JOAAT("fm_race_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
add_native_detour(RAGE_JOAAT("fm_capture_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
add_native_detour(RAGE_JOAAT("fm_deathmatch_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
add_native_detour(RAGE_JOAAT("fm_lts_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
add_native_detour(RAGE_JOAAT("fm_survival_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
for (auto& entry : *g_pointers->m_script_program_table) for (auto& entry : *g_pointers->m_script_program_table)
if (entry.m_program) if (entry.m_program)

View File

@ -43,6 +43,16 @@ namespace big::mobile
{ {
*script_global(scr_globals::mechanic_global).at(888).as<int*>() = 1; *script_global(scr_globals::mechanic_global).at(888).as<int*>() = 1;
} }
inline void request_backup_helicopter()
{
*script_global(scr_globals::mechanic_global).at(4484).as<int*>() = 1;
}
inline void request_airstrike()
{
*script_global(scr_globals::mechanic_global).at(4485).as<int*>() = 1;
}
} }
namespace mors_mutual namespace mors_mutual
@ -85,6 +95,14 @@ namespace big::mobile
} }
} }
namespace ceo_abilities
{
inline void request_bullshark_testosterone()
{
*script_global(2672505).at(3689).as<int*>() = 1;
}
}
namespace mechanic namespace mechanic
{ {
inline Vehicle get_personal_vehicle() inline Vehicle get_personal_vehicle()

View File

@ -23,7 +23,8 @@ namespace big
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([]
{ {
for (auto& command : g_looped_commands) for (auto& command : g_looped_commands)
command->on_disable(); if (command->is_enabled())
command->on_disable();
g_running = false; g_running = false;
}); });

View File

@ -9,7 +9,6 @@ namespace big
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always); ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
components::sub_title("Merryweather"); components::sub_title("Merryweather");
ImGui::Separator(); ImGui::Separator();
components::button("Request Ammo Drop", [] { components::button("Request Ammo Drop", [] {
@ -20,6 +19,15 @@ namespace big
mobile::merry_weather::request_helicopter_pickup(); mobile::merry_weather::request_helicopter_pickup();
}); });
components::button("Request Backup Helicopter", [] {
mobile::merry_weather::request_backup_helicopter();
});
components::button("Request Airstrike", [] {
mobile::merry_weather::request_airstrike();
});
components::sub_title("Mors Mutual");
ImGui::Separator(); ImGui::Separator();
components::button("Mors Mutual Fix All Vehicles", [] { components::button("Mors Mutual Fix All Vehicles", [] {
@ -28,5 +36,13 @@ namespace big
std::format("{} vehicle{} been fixed.", amount_fixed, amount_fixed == 1 ? " has" : "s have") std::format("{} vehicle{} been fixed.", amount_fixed, amount_fixed == 1 ? " has" : "s have")
); );
}); });
components::sub_title("CEO Abilities");
ImGui::Separator();
components::button("Bullshark Testosterone", [] {
mobile::ceo_abilities::request_bullshark_testosterone();
});
} }
} }

View File

@ -114,5 +114,13 @@ namespace big
components::button("Deathmatch", [] { scripts::start_creator_script(RAGE_JOAAT("fm_deathmatch_creator")); }); ImGui::SameLine(); components::button("Deathmatch", [] { scripts::start_creator_script(RAGE_JOAAT("fm_deathmatch_creator")); }); ImGui::SameLine();
components::button("LTS", [] { scripts::start_creator_script(RAGE_JOAAT("fm_lts_creator")); }); components::button("LTS", [] { scripts::start_creator_script(RAGE_JOAAT("fm_lts_creator")); });
ImGui::EndGroup(); ImGui::EndGroup();
components::sub_title("Creator Options");
ImGui::BeginGroup();
ImGui::Checkbox("Infinite Model Memory", &g.ugc.infinite_model_memory);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Infinite Model Memory is only useful if dev mode is not activated");
ImGui::EndGroup();
} }
} }