Skip to content

Commit

Permalink
gta sa newgame crashfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Feb 28, 2016
1 parent fef0ec2 commit ecfba84
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions III.VC.SA.SaveLoader/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,8 @@ void __cdecl FrontendIdleHookSA()
{
static int nTimes = 0;
injector::MakeCALL(0x53E80E, RsCameraBeginUpdateNOP, true);

if (++nTimes == 2)
if (++nTimes >= 2)
{
bool bNoLoad = (GetAsyncKeyState(VK_SHIFT) & 0xF000) != 0;
if (!bNoLoad && nSaveNum != -1)
Expand All @@ -554,7 +554,9 @@ void __cdecl FrontendIdleHookSA()
static uint32_t CMenuManager = 0xBA6748;
if (nSaveNum == 129) //NG
{
*injector::memory_pointer(CMenuManager + 0x5D).get<char>() = 1;
*injector::memory_pointer(CMenuManager + 0x5C).get<char>() = 0; //menu.m_bMenuActive

}
else
{
Expand All @@ -573,7 +575,7 @@ void __cdecl FrontendIdleHookSA()
injector::MakeCALL(0x53E80E, 0x619450);
injector::MakeCALL(0x53ECCB, 0x53E770);
}

return hbFrontendIdleSA.fun();
}

Expand Down

0 comments on commit ecfba84

Please sign in to comment.