mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-24 22:32: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 "StdAfxSA.h"
|
||||||
#include "ScriptSA.h"
|
#include "ScriptSA.h"
|
||||||
|
|
||||||
static int* StatTypesInt = *AddressByVersion<int**>(0x55C0D8, 0x55C578, 0x574F24);
|
int32_t* CRunningScript::GetDay_GymGlitch()
|
||||||
|
|
||||||
std::pair<uint32_t,uint32_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;
|
static int* const StatTypesInt = *AddressByVersion<int**>(0x55C0D8, 0x55C578, 0x574F24);
|
||||||
Out.second = StatTypesInt[134-120];
|
|
||||||
|
Out[0] = -1;
|
||||||
|
Out[1] = StatTypesInt[134-120];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Out.first = nGameClockMonths;
|
Out[0] = nGameClockMonths;
|
||||||
Out.second = nGameClockDays;
|
Out[1] = nGameClockDays;
|
||||||
}
|
}
|
||||||
|
|
||||||
return &Out;
|
return Out;
|
||||||
}
|
}
|
@ -67,7 +67,7 @@ private:
|
|||||||
BYTE IsCustom;
|
BYTE IsCustom;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::pair<uint32_t,uint32_t>* GetDay_GymGlitch();
|
int32_t* GetDay_GymGlitch();
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(sizeof(CRunningScript) == 0xE0, "Wrong size: CRunningScript");
|
static_assert(sizeof(CRunningScript) == 0xE0, "Wrong size: CRunningScript");
|
||||||
|
Loading…
Reference in New Issue
Block a user