mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-25 06:42:29 +01:00
Refactored gym glitch fix to please Danny
This commit is contained in:
parent
62ed9242bc
commit
5679c66311
@ -1,22 +1,22 @@
|
||||
#include "StdAfxSA.h"
|
||||
#include "ScriptSA.h"
|
||||
|
||||
static int* StatTypesInt = *AddressByVersion<int**>(0x55C0D8, 0x55C578, 0x574F24);
|
||||
|
||||
std::pair<uint32_t,uint32_t>* CRunningScript::GetDay_GymGlitch()
|
||||
int32_t* CRunningScript::GetDay_GymGlitch()
|
||||
{
|
||||
static std::pair<uint32_t,uint32_t> Out;
|
||||
static int32_t Out[2];
|
||||
|
||||
if ( !strncmp(Name, "gymbike", 8) || !strncmp(Name, "gymbenc", 8) || !strncmp(Name, "gymtrea", 8) || !strncmp(Name, "gymdumb", 8) )
|
||||
if ( strncmp(Name, "gymbike", 8) == 0 || strncmp(Name, "gymbenc", 8) == 0 || strncmp(Name, "gymtrea", 8) == 0 || strncmp(Name, "gymdumb", 8) == 0 )
|
||||
{
|
||||
Out.first = 0xFFFFFFFF;
|
||||
Out.second = StatTypesInt[134-120];
|
||||
static int* const StatTypesInt = *AddressByVersion<int**>(0x55C0D8, 0x55C578, 0x574F24);
|
||||
|
||||
Out[0] = -1;
|
||||
Out[1] = StatTypesInt[134-120];
|
||||
}
|
||||
else
|
||||
{
|
||||
Out.first = nGameClockMonths;
|
||||
Out.second = nGameClockDays;
|
||||
Out[0] = nGameClockMonths;
|
||||
Out[1] = nGameClockDays;
|
||||
}
|
||||
|
||||
return &Out;
|
||||
return Out;
|
||||
}
|
@ -67,7 +67,7 @@ private:
|
||||
BYTE IsCustom;
|
||||
|
||||
public:
|
||||
std::pair<uint32_t,uint32_t>* GetDay_GymGlitch();
|
||||
int32_t* GetDay_GymGlitch();
|
||||
};
|
||||
|
||||
static_assert(sizeof(CRunningScript) == 0xE0, "Wrong size: CRunningScript");
|
||||
|
Loading…
Reference in New Issue
Block a user