Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup patterns #56

Merged
merged 11 commits into from
Jan 21, 2024
8 changes: 5 additions & 3 deletions code/client/src/core/dev_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "game/helpers/controls.h"
#include "game/helpers/human.h"
#include "game/streaming/entity_factory.h"

#include "sdk/c_game_traffic_module.h"
#include "sdk/entities/c_car.h"
#include "sdk/entities/c_crash_obj.h"
Expand All @@ -35,11 +36,12 @@

#include "shared/game_rpc/human/human_changeskin.h"

#include "../sdk/mafia/framework/c_mafia_dbs.h"
#include "../sdk/mafia/framework/c_vehicles_database.h"
#include "../sdk/ue/sys/sodb/c_sys_odb.h"
#include "modules/human.h"

#include "sdk/mafia/framework/c_mafia_dbs.h"
#include "sdk/mafia/framework/c_vehicles_database.h"
#include "sdk/ue/sys/sodb/c_sys_odb.h"

namespace MafiaMP::Core {
DevFeatures::DevFeatures() {
_entityBrowser = std::make_shared<UI::EntityBrowser>();
Expand Down
5 changes: 2 additions & 3 deletions code/client/src/core/hooks/application.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#include <MinHook.h>
#include <utils/hooking/hook_function.h>
#include <utils/hooking/hooking.h>

#include "../../sdk/patterns.h"
#include "sdk/patterns.h"

bool __fastcall C_GameFramework__IsSuspended(void *_this) {
return false;
}

static InitFunction init([]() {
// Don't pause the game when out of window
MH_CreateHook((LPVOID)SDK::gPatterns.C_GameFramework__IsSuspendedAddr, (PBYTE)&C_GameFramework__IsSuspended, nullptr);
MH_CreateHook((LPVOID)SDK::gPatterns.C_GameFramework__IsSuspended, (PBYTE)&C_GameFramework__IsSuspended, nullptr);
});
8 changes: 4 additions & 4 deletions code/client/src/core/hooks/character_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#include <utils/hooking/hook_function.h>
#include <utils/hooking/hooking.h>

#include "../../sdk/c_ie.h"
#include "../../sdk/entities/c_player_2.h"
#include "../../sdk/ue/game/humainai/c_character_controller.h"
#include "../../sdk/c_game.h"
#include "sdk/c_ie.h"
#include "sdk/entities/c_player_2.h"
#include "sdk/ue/game/humainai/c_character_controller.h"
#include "sdk/c_game.h"

#include "../../game/overrides/character_controller.h"
#include "../../game/overrides/scoped_entity_type_faker.h"
Expand Down
4 changes: 2 additions & 2 deletions code/client/src/core/hooks/fast_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <utils/hooking/hooking.h>
#include <utils/hooking/hook_function.h>

#include "../../sdk/mafia/ui/c_game_gui_2_module.h"
#include "../../sdk/mafia/ui/menu/c_save_menu.h"
#include "sdk/mafia/ui/c_game_gui_2_module.h"
#include "sdk/mafia/ui/menu/c_save_menu.h"

void __fastcall C_MainMenu__QueueMenuSequenceScreen(void *_this, int sequence, bool cannotSkip) {
if (sequence == -1) {
Expand Down
2 changes: 1 addition & 1 deletion code/client/src/core/hooks/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <logging/logger.h>

#include "../../sdk/mafia/ui/menu/c_menu_base.h"
#include "sdk/mafia/ui/menu/c_menu_base.h"

typedef int64_t(__fastcall *C_MenuBase__OnScriptedMenuEvent_t)(void *pThis, int, SDK::mafia::ui::menu::C_MenuBase::E_ScriptedMenuEvent);
C_MenuBase__OnScriptedMenuEvent_t C_MenuBase__OnScriptedMenuEvent_original = nullptr;
Expand Down
11 changes: 5 additions & 6 deletions code/client/src/core/hooks/mod_init.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "../../game/module.h"
#include "../../sdk/patterns.h"
#include "sdk/patterns.h"

#include <MinHook.h>
#include <utils/hooking/hooking.h>
#include <utils/hooking/hook_function.h>

// Ticked module hooking
Expand All @@ -13,7 +12,7 @@ void __fastcall C_InitDone__MafiaFramework(void *_this) {
MafiaMP::Game::gGlobals.module = new MafiaMP::Game::ModModule();
}

// Intro vide hooking
// Intro video hooking
int __fastcall C_CommandLine__FindCommand(void *_this, const char *command) {
if (strstr(command, "NoMy2K") || strstr(command, "SkipLoadingPrompt") /*|| strstr(command, "fastRender")*/) {
return 1;
Expand All @@ -22,11 +21,11 @@ int __fastcall C_CommandLine__FindCommand(void *_this, const char *command) {
}

static InitFunction init([]() {
MH_CreateHook((LPVOID)SDK::gPatterns.C_InitDone_MafiaFrameworkAddr, (PBYTE)C_InitDone__MafiaFramework, reinterpret_cast<void **>(&C_InitDone__Init_MafiaFramework_original));
MH_CreateHook((LPVOID)SDK::gPatterns.C_InitDone_MafiaFramework, (PBYTE)C_InitDone__MafiaFramework, reinterpret_cast<void **>(&C_InitDone__Init_MafiaFramework_original));

// Disable the loading intro
hook::return_function(SDK::gPatterns.LoadIntroAddr);
hook::return_function(SDK::gPatterns.LoadIntro);

// Skip loading prompt & debug stuff
MH_CreateHook((LPVOID)SDK::gPatterns.C_CommandLine__FindCommandAddr, (PBYTE)C_CommandLine__FindCommand, nullptr);
MH_CreateHook((LPVOID)SDK::gPatterns.C_CommandLine__FindCommand, (PBYTE)C_CommandLine__FindCommand, nullptr);
});
6 changes: 5 additions & 1 deletion code/client/src/core/hooks/navigation.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#include <utils/safe_win32.h>

#include <MinHook.h>

#include <utils/hooking/hook_function.h>
#include <utils/hooking/hooking.h>

#include <logging/logger.h>

#include "../application.h"

#include "../../game/helpers/districts.h"
#include "../../sdk/mafia/framework/director/c_game_director.h"

#include "sdk/mafia/framework/director/c_game_director.h"

typedef int64_t(__fastcall *C_Navigation__OnDistrictChange_t)(void *, SDK::mafia::framework::director::I_GameDirector::C_DistrictDefinition const &);
C_Navigation__OnDistrictChange_t C_Navigation__OnDistrictChange_original = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions code/client/src/core/hooks/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include <logging/logger.h>

#include "../../sdk/entities/c_player_2.h"
#include "../../sdk/c_game.h"
#include "sdk/entities/c_player_2.h"
#include "sdk/c_game.h"

typedef bool(__fastcall *C_Player2__IsInputDisabled_t)(SDK::C_Player2 *, int);
C_Player2__IsInputDisabled_t C_Player2__IsInputDisabled_Original = nullptr;
Expand Down
10 changes: 5 additions & 5 deletions code/client/src/core/hooks/render_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

#include "../../game/module.h"

#include "../../sdk/ue/c_application_win32.h"
#include "../../sdk/ue/sys/render/device/c_d3d11_window_context_cache.h"
#include "../../sdk/ue/sys/render/device/c_direct_3d11_render_device.h"
#include "../../sdk/ue/sys/render/device/c_dynamic_vi_buffer_pool.h"
#include "../../sdk/ue/sys/render/device/s_render_device_desc.h"
#include "sdk/ue/c_application_win32.h"
#include "sdk/ue/sys/render/device/c_d3d11_window_context_cache.h"
#include "sdk/ue/sys/render/device/c_direct_3d11_render_device.h"
#include "sdk/ue/sys/render/device/c_dynamic_vi_buffer_pool.h"
#include "sdk/ue/sys/render/device/s_render_device_desc.h"

typedef bool(__fastcall *C_Direct3D11RenderDevice__Init_t)(SDK::ue::sys::render::device::C_Direct3D11RenderDevice *pThis, SDK::ue::sys::render::device::S_RenderDeviceDesc const &a2, SDK::ue::sys::render::device::C_DynamicVIBufferPool &a3, void *idk);
C_Direct3D11RenderDevice__Init_t C_Direct3D11RenderDevice__Init_original = nullptr;
Expand Down
18 changes: 9 additions & 9 deletions code/client/src/core/hooks/slot_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@

#include <logging/logger.h>

#include "../../sdk/ue/sys/core/c_frame.h"
#include "../../sdk/ue/sys/core/c_scene.h"
#include "../../sdk/ue/sys/math/c_vector.h"
#include "sdk/ue/sys/core/c_frame.h"
#include "sdk/ue/sys/core/c_scene.h"
#include "sdk/ue/sys/math/c_vector.h"

#include "../../sdk/mafia/streaming/c_slot_wrapper.h"
#include "sdk/mafia/streaming/c_slot_wrapper.h"

#include "../../sdk/entities/c_actor.h"
#include "../../sdk/ue/sys/utils/c_hash_name.h"
#include "sdk/entities/c_actor.h"
#include "sdk/ue/sys/utils/c_hash_name.h"

typedef bool(__fastcall *C_SlotManagerWrapper__ConnectToQuota_t)(void *, SDK::mafia::streaming::I_SlotWrapper *, char const *, int, int);
C_SlotManagerWrapper__ConnectToQuota_t C_SlotManagerWrapper__ConnectToQuota_original = nullptr;

bool C_SlotManagerWrapper__ConnectToQuota(void* pThis, SDK::mafia::streaming::I_SlotWrapper* slotWrapper, char const* name, int slotType, int unk) {
bool C_SlotManagerWrapper__ConnectToQuota(void *pThis, SDK::mafia::streaming::I_SlotWrapper *slotWrapper, char const *name, int slotType, int unk) {
// Framework::Logging::GetLogger("Hooks")->debug("[Wrapper] Connected to quota {} for slot type {} and unk {} ({})", name, slotType, unk, slotWrapper->GetWrapperName());
return C_SlotManagerWrapper__ConnectToQuota_original(pThis, slotWrapper, name, slotType, unk);
}

typedef int64_t(__fastcall *C_SlotManagerWrapper__LoadData_t)(void *, char const *, SDK::ue::sys::core::C_Scene *, unsigned int, char const *, bool *, bool);
C_SlotManagerWrapper__LoadData_t C_SlotManagerWrapper__LoadData_original = nullptr;

int64_t C_SlotManagerWrapper__LoadData(void* pThis, char const* sdsName, SDK::ue::sys::core::C_Scene* scene, unsigned int unk, char const* dataName, bool* unk2, bool unk3) {
int64_t C_SlotManagerWrapper__LoadData(void *pThis, char const *sdsName, SDK::ue::sys::core::C_Scene *scene, unsigned int unk, char const *dataName, bool *unk2, bool unk3) {
// Framework::Logging::GetLogger("Hooks")->debug("[Wrapper] Loaded data = {} | {} | {}", sdsName, unk, dataName);
return C_SlotManagerWrapper__LoadData_original(pThis, sdsName, scene, unk, dataName, unk2, unk3);
}

typedef int64_t(__fastcall *C_Slot__LoadData_t)(void *, char const *, SDK::ue::sys::core::C_Scene *, unsigned int, void *, char const *, bool *, bool);
C_Slot__LoadData_t C_Slot__LoadData_original = nullptr;

int64_t C_Slot__LoadData(void *pThis, char const *sdsName, SDK::ue::sys::core::C_Scene *scene, unsigned int unk, void * unkPtr, char const *dataName, bool *unk2, bool unk3) {
int64_t C_Slot__LoadData(void *pThis, char const *sdsName, SDK::ue::sys::core::C_Scene *scene, unsigned int unk, void *unkPtr, char const *dataName, bool *unk2, bool unk3) {
// Framework::Logging::GetLogger("Hooks")->debug("Loaded data = {} | {} | {}", sdsName, unk, dataName);
return C_Slot__LoadData_original(pThis, sdsName, scene, unk, unkPtr, dataName, unk2, unk3);
}
Expand Down
6 changes: 3 additions & 3 deletions code/client/src/core/hooks/stream_map.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <MinHook.h>
#include <utils/hooking/hook_function.h>
#include <utils/hooking/hooking.h>

#include "../../sdk/patterns.h"
#include "../../sdk/c_stream_map.h"
#include "sdk/patterns.h"

#include "sdk/c_stream_map.h"

#include <logging/logger.h>

Expand Down
2 changes: 1 addition & 1 deletion code/client/src/core/hooks/translocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <logging/logger.h>

#include "../../sdk/ue/sys/math/c_vector.h"
#include "sdk/ue/sys/math/c_vector.h"

struct S_ObjectToSpawn {
char pad0[0x10];
Expand Down
12 changes: 6 additions & 6 deletions code/client/src/core/hooks/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#include "../modules/vehicle.h"
#include "shared/modules/vehicle_sync.hpp"

#include "../../sdk/entities/c_actor.h"
#include "../../sdk/entities/c_car.h"
#include "../../sdk/entities/c_human_2.h"
#include "../../sdk/entities/c_vehicle.h"
#include "../../sdk/wrappers/c_human_2_car_wrapper.h"
#include "sdk/entities/c_actor.h"
#include "sdk/entities/c_car.h"
#include "sdk/entities/c_human_2.h"
#include "sdk/entities/c_vehicle.h"
#include "sdk/wrappers/c_human_2_car_wrapper.h"

SDK::C_Actor* C_ActorAction__GetOwnerAsActor(void *pThis) {
return hook::this_call<SDK::C_Actor *>(0x0000001423434E0, pThis);
Expand Down Expand Up @@ -127,7 +127,7 @@ void C_Human2CarWrapper__EndDrive(SDK::C_Human2CarWrapper *pThis, SDK::C_Actor *
}
}

static InitFunction init([]() {
static InitFunction init([]() {
// Disable automated vehicle enable (engine, siren, beacon lights etc...) when player enter it
const auto C_Human2CarWrapper__StartDrive_Addr = hook::pattern("48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 57 48 83 EC 70 45 33 FF").get_first();
MH_CreateHook((LPVOID)C_Human2CarWrapper__StartDrive_Addr, (PBYTE)C_Human2CarWrapper__StartDrive, reinterpret_cast<void **>(&C_Human2CarWrapper__StartDrive_original));
Expand Down
2 changes: 1 addition & 1 deletion code/client/src/core/hooks/vfs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "../../sdk/ue/sys/filesystem/c_virtual_file_system_cache.h"
#include "sdk/ue/sys/filesystem/c_virtual_file_system_cache.h"

struct S_Init {

Expand Down
35 changes: 21 additions & 14 deletions code/client/src/core/hooks/weapon_controller.cpp
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
#include <utils/safe_win32.h>

#include <MinHook.h>

#include <utils/hooking/hook_function.h>
#include <utils/hooking/hooking.h>

#include "core/application.h"

#include "shared/modules/human_sync.hpp"
#include "../../sdk/ue/sys/math/c_vector.h"
#include "../../sdk/entities/c_player_2.h"
#include "../../sdk/inventory/c_inventory_wrapper.h"
#include "../../sdk/entities/human/c_human_weapon_controller.h"
#include "../../sdk/ue/game/humainai/c_character_state_handler_aim.h"

#include "sdk/entities/c_player_2.h"
#include "sdk/entities/human/c_human_weapon_controller.h"
#include "sdk/inventory/c_inventory_wrapper.h"
#include "sdk/ue/game/humainai/c_character_state_handler_aim.h"
#include "sdk/ue/sys/math/c_vector.h"

#include "game/helpers/controls.h"

#include <world/client.h>

#include "shared/game_rpc/human/human_shoot.h"

#include "shared/game_rpc/human/human_reload.h"

#include <logging/logger.h>

#include <flecs/flecs.h>
#include <core/modules/human.h>

#include <logging/logger.h>
#include <core/modules/human.h>

using namespace SDK;

flecs::entity FindHumanByHumanWeaponController(SDK::C_HumanWeaponController * C_HumanWeaponController) {
flecs::entity FindHumanByHumanWeaponController(SDK::C_HumanWeaponController *C_HumanWeaponController) {
flecs::entity foundPlayerEntity {};
MafiaMP::Core::Modules::Human::findAllHumans.each([C_HumanWeaponController, &foundPlayerEntity](flecs::entity e, MafiaMP::Core::Modules::Human::Tracking &tracking) {
if (tracking.human->GetHumanWeaponController() == C_HumanWeaponController) {
Expand All @@ -40,7 +46,7 @@ flecs::entity FindHumanByHumanWeaponController(SDK::C_HumanWeaponController * C_
typedef bool(__fastcall *C_HumanWeaponController__SetAiming_t)(SDK::C_HumanWeaponController *, bool);
C_HumanWeaponController__SetAiming_t C_HumanWeaponController__SetAiming_Original = nullptr;
bool C_HumanWeaponController__SetAiming(SDK::C_HumanWeaponController *_this, bool aiming) {
auto gameLocalPlayer = MafiaMP::Game::Helpers::Controls::GetLocalPlayer();
auto gameLocalPlayer = MafiaMP::Game::Helpers::Controls::GetLocalPlayer();
if (gameLocalPlayer && gameLocalPlayer->GetHumanWeaponController() == _this) {
if (const auto localPlayer = MafiaMP::Core::gApplication->GetLocalPlayer()) {
auto updateData = localPlayer.get_mut<MafiaMP::Shared::Modules::HumanSync::UpdateData>();
Expand All @@ -49,7 +55,7 @@ bool C_HumanWeaponController__SetAiming(SDK::C_HumanWeaponController *_this, boo
}
else if (const auto remoteHuman = FindHumanByHumanWeaponController(_this)) {
const auto updateData = remoteHuman.get<MafiaMP::Shared::Modules::HumanSync::UpdateData>();
aiming = updateData->weaponData.isAiming;
aiming = updateData->weaponData.isAiming;
Framework::Logging::GetLogger("Hooks")->info("Remote ped aiming {}", aiming);
}

Expand All @@ -59,7 +65,7 @@ bool C_HumanWeaponController__SetAiming(SDK::C_HumanWeaponController *_this, boo
typedef bool(__fastcall *C_HumanWeaponController__SetFirePressedFlag_t)(SDK::C_HumanWeaponController *, bool);
C_HumanWeaponController__SetFirePressedFlag_t C_HumanWeaponController__SetFirePressedFlag_Original = nullptr;
bool C_HumanWeaponController__SetFirePressedFlag(SDK::C_HumanWeaponController *_this, bool firePressed) {
auto gameLocalPlayer = MafiaMP::Game::Helpers::Controls::GetLocalPlayer();
auto gameLocalPlayer = MafiaMP::Game::Helpers::Controls::GetLocalPlayer();
if (gameLocalPlayer && gameLocalPlayer->GetHumanWeaponController() == _this) {
if (const auto localPlayer = MafiaMP::Core::gApplication->GetLocalPlayer()) {
auto updateData = localPlayer.get_mut<MafiaMP::Shared::Modules::HumanSync::UpdateData>();
Expand All @@ -86,21 +92,22 @@ void C_HumanWeaponController__GetShotPosDir(SDK::C_HumanWeaponController *_this,
updateData->weaponData.aimPos = {pos.x, pos.y, pos.z};
updateData->weaponData.aimDir = {dir.x, dir.y, dir.z};
}
} else if (auto remoteHuman = FindHumanByHumanWeaponController(_this)) {
}
else if (auto remoteHuman = FindHumanByHumanWeaponController(_this)) {
// But if it's the remote ped, we don't want to grab game info and we just set pointers to broadcasted data
const auto updateData = remoteHuman.get<MafiaMP::Shared::Modules::HumanSync::UpdateData>();
pos = {updateData->weaponData.aimPos.x, updateData->weaponData.aimPos.y, updateData->weaponData.aimPos.z};
dir = {updateData->weaponData.aimDir.x, updateData->weaponData.aimDir.y, updateData->weaponData.aimDir.z};
}
}

typedef bool(__fastcall *C_HumanWeaponController__DoWeaponSelectByItemId_t)(void*, unsigned int, bool);
typedef bool(__fastcall *C_HumanWeaponController__DoWeaponSelectByItemId_t)(void *, unsigned int, bool);
C_HumanWeaponController__DoWeaponSelectByItemId_t C_HumanWeaponController__DoWeaponSelectByItemId_Original = nullptr;
bool C_HumanWeaponController__DoWeaponSelectByItemId(SDK::C_HumanWeaponController *_this, unsigned int itemId, bool unk1) {
auto gameLocalPlayer = MafiaMP::Game::Helpers::Controls::GetLocalPlayer();
if (gameLocalPlayer && gameLocalPlayer->GetHumanWeaponController() == _this) {
if (const auto localPlayer = MafiaMP::Core::gApplication->GetLocalPlayer()) {
auto updateData = localPlayer.get_mut<MafiaMP::Shared::Modules::HumanSync::UpdateData>();
auto updateData = localPlayer.get_mut<MafiaMP::Shared::Modules::HumanSync::UpdateData>();
updateData->weaponData.currentWeaponId = uint16_t(itemId);
}
}
Expand Down
14 changes: 7 additions & 7 deletions code/client/src/core/luavm.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "luavm.h"
#include "../sdk/patterns.h"

#include "sdk/patterns.h"

#include <MinHook.h>
#include <logging/logger.h>
#include <utils/hooking/hooking.h>

#include <sstream>

Expand All @@ -12,7 +12,7 @@
using namespace SDK;

namespace MafiaMP::Core {
using lua_State = void;
using lua_State = void;
lua_State *g_luaState = nullptr;

typedef int32_t(__cdecl *lua_pcall_t)(lua_State *L, int32_t nargs, int32_t nresults, int32_t errfunc);
Expand Down Expand Up @@ -85,9 +85,9 @@ namespace MafiaMP::Core {
}

static InitFunction init([]() {
MH_CreateHook(reinterpret_cast<void **>(gPatterns.Lua__pcallAddr), reinterpret_cast<void **>(lua_pcall_), reinterpret_cast<void **>(&plua_pcall));
MH_CreateHook(reinterpret_cast<void **>(gPatterns.Lua__loadbufferAddr), reinterpret_cast<void **>(luaL_loadbuffer_), reinterpret_cast<void **>(&pluaL_loadbuffer));
MH_CreateHook(reinterpret_cast<void **>(gPatterns.Lua__tostringAddr), reinterpret_cast<void **>(lua_tostring_), reinterpret_cast<void **>(&plua_tostring));
MH_CreateHook(reinterpret_cast<void **>(gPatterns.Lua__isstringAddr), reinterpret_cast<void **>(lua_isstring_), reinterpret_cast<void **>(&plua_isstring));
MH_CreateHook(reinterpret_cast<void **>(gPatterns.Lua__pcall), reinterpret_cast<void **>(lua_pcall_), reinterpret_cast<void **>(&plua_pcall));
MH_CreateHook(reinterpret_cast<void **>(gPatterns.Lua__loadbuffer), reinterpret_cast<void **>(luaL_loadbuffer_), reinterpret_cast<void **>(&pluaL_loadbuffer));
MH_CreateHook(reinterpret_cast<void **>(gPatterns.Lua__tostring), reinterpret_cast<void **>(lua_tostring_), reinterpret_cast<void **>(&plua_tostring));
MH_CreateHook(reinterpret_cast<void **>(gPatterns.Lua__isstring), reinterpret_cast<void **>(lua_isstring_), reinterpret_cast<void **>(&plua_isstring));
});
} // namespace MafiaMP::Core
Loading