Fixcrash with walking style changer

This commit is contained in:
Grinch_ 2021-07-06 15:13:38 +06:00
parent 4ff4fcf745
commit a7e69d0d05
2 changed files with 6 additions and 7 deletions

View File

@ -56,7 +56,8 @@ void Animation::Draw()
if (ImGui::BeginTabBar("Animation", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
{
ImGui::Spacing();
int hPlayer = CPools::GetPedRef(FindPlayerPed());
CPlayerPed* pPlayer = FindPlayerPed();
int hPlayer = CPools::GetPedRef(pPlayer);
ImGui::Spacing();
@ -102,14 +103,12 @@ void Animation::Draw()
{
if (m_nWalkingStyle == "default")
{
patch::Set<DWORD>(0x609A4E, 0x4D48689, false);
patch::Set<WORD>(0x609A52, 0, false);
patch::Set<DWORD>(0x609A4E, 0x4D48689);
patch::Set<WORD>(0x609A52, 0);
}
else
{
patch::Set<DWORD>(0x609A4E, -0x6F6F6F70, false);
patch::Nop(0x609A52, 2, false);
patch::Nop(0x609A4E, 6);
Command<Commands::REQUEST_ANIMATION>(m_nWalkingStyle.c_str());
Command<Commands::LOAD_ALL_MODELS_NOW>();
Command<Commands::SET_ANIM_GROUP_FOR_CHAR>(hPlayer, m_nWalkingStyle.c_str());

View File

@ -2,5 +2,5 @@
#define MENU_NAME "Cheat Menu"
#define MENU_VERSION_NUMBER "2.8"
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
#define BUILD_NUMBER "20210702"
#define BUILD_NUMBER "20210705"
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"