mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-23 04:27:25 +08:00
Actually fix integrity checks (#2232)
This commit is contained in:
parent
2d2a5c51a2
commit
b0c4c86f48
@ -183,7 +183,7 @@ namespace big
|
||||
static bool sync_reader_serialize_array(void* _this, void* array, int size);
|
||||
|
||||
static bool remove_player_from_sender_list(void* list, uint64_t rockstar_id);
|
||||
static void game_skeleton_update(__int64 update_group);
|
||||
static void game_skeleton_update(__int64 skeleton, int type);
|
||||
};
|
||||
|
||||
class minhook_keepalive
|
||||
|
@ -1,8 +1,32 @@
|
||||
#include "hooking.hpp"
|
||||
|
||||
// rage::gameSkeleton -> modes (does not derive from updateBase?) -> groups -> items
|
||||
|
||||
namespace big
|
||||
{
|
||||
class game_skeleton_update_group;
|
||||
class game_skeleton_item;
|
||||
|
||||
#pragma pack(push, 8)
|
||||
struct game_skeleton_update_mode
|
||||
{
|
||||
int m_type; // 0x00
|
||||
game_skeleton_update_group* m_groups; // 0x08
|
||||
game_skeleton_update_mode* m_next; // 0x10
|
||||
};
|
||||
static_assert(sizeof(game_skeleton_update_mode) == 0x18);
|
||||
|
||||
struct game_skeleton_update_group
|
||||
{
|
||||
virtual ~game_skeleton_update_group() = default;
|
||||
virtual void run() = 0; // 0x08
|
||||
|
||||
char pad[0x10]; // 0x08
|
||||
game_skeleton_update_group* m_next; // 0x18
|
||||
game_skeleton_item* m_items; // 0x20
|
||||
};
|
||||
static_assert(sizeof(game_skeleton_update_group) == 0x28);
|
||||
|
||||
struct game_skeleton_item
|
||||
{
|
||||
virtual ~game_skeleton_item() = default;
|
||||
@ -15,10 +39,25 @@ namespace big
|
||||
static_assert(sizeof(game_skeleton_item) == 0x20);
|
||||
#pragma pack(pop)
|
||||
|
||||
void hooks::game_skeleton_update(__int64 update_group)
|
||||
void hooks::game_skeleton_update(__int64 skeleton, int type)
|
||||
{
|
||||
for (auto item = *(game_skeleton_item**)(update_group + 0x20); item; item = item->m_next)
|
||||
if (item->m_hash != 0xA0F39FB6)
|
||||
item->run();
|
||||
for (auto mode = *(game_skeleton_update_mode**)(skeleton + 0x140); mode; mode = mode->m_next)
|
||||
{
|
||||
if (mode && mode->m_type == type)
|
||||
{
|
||||
for (auto group = mode->m_groups; group; group = group->m_next)
|
||||
{
|
||||
for (auto item = group->m_items; item; item = item->m_next)
|
||||
{
|
||||
if (item->m_hash != 0xA0F39FB6)
|
||||
{
|
||||
item->run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1689,7 +1689,7 @@ namespace big
|
||||
// Game Skeleton Update
|
||||
{
|
||||
"GSU",
|
||||
"40 53 48 83 EC 20 48 8B 59 20 EB 0D",
|
||||
"40 53 48 83 EC 20 48 8B 81 40 01",
|
||||
[](memory::handle ptr)
|
||||
{
|
||||
g_pointers->m_gta.m_game_skeleton_update = ptr.as<PVOID>();
|
||||
|
Loading…
Reference in New Issue
Block a user