Fixcrash with walking style changer
This commit is contained in:
parent
4ff4fcf745
commit
a7e69d0d05
@ -56,7 +56,8 @@ void Animation::Draw()
|
|||||||
if (ImGui::BeginTabBar("Animation", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
|
if (ImGui::BeginTabBar("Animation", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
|
||||||
{
|
{
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
int hPlayer = CPools::GetPedRef(FindPlayerPed());
|
CPlayerPed* pPlayer = FindPlayerPed();
|
||||||
|
int hPlayer = CPools::GetPedRef(pPlayer);
|
||||||
|
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
|
|
||||||
@ -102,14 +103,12 @@ void Animation::Draw()
|
|||||||
{
|
{
|
||||||
if (m_nWalkingStyle == "default")
|
if (m_nWalkingStyle == "default")
|
||||||
{
|
{
|
||||||
patch::Set<DWORD>(0x609A4E, 0x4D48689, false);
|
patch::Set<DWORD>(0x609A4E, 0x4D48689);
|
||||||
patch::Set<WORD>(0x609A52, 0, false);
|
patch::Set<WORD>(0x609A52, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
patch::Set<DWORD>(0x609A4E, -0x6F6F6F70, false);
|
patch::Nop(0x609A4E, 6);
|
||||||
patch::Nop(0x609A52, 2, false);
|
|
||||||
|
|
||||||
Command<Commands::REQUEST_ANIMATION>(m_nWalkingStyle.c_str());
|
Command<Commands::REQUEST_ANIMATION>(m_nWalkingStyle.c_str());
|
||||||
Command<Commands::LOAD_ALL_MODELS_NOW>();
|
Command<Commands::LOAD_ALL_MODELS_NOW>();
|
||||||
Command<Commands::SET_ANIM_GROUP_FOR_CHAR>(hPlayer, m_nWalkingStyle.c_str());
|
Command<Commands::SET_ANIM_GROUP_FOR_CHAR>(hPlayer, m_nWalkingStyle.c_str());
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
#define MENU_NAME "Cheat Menu"
|
#define MENU_NAME "Cheat Menu"
|
||||||
#define MENU_VERSION_NUMBER "2.8"
|
#define MENU_VERSION_NUMBER "2.8"
|
||||||
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
|
#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 ")"
|
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"
|
||||||
|
Loading…
Reference in New Issue
Block a user