Switch to uint32_t for script checksums

Crc32 is unsigned int (32-bit).
This commit is contained in:
Kawe Mazidjatari 2022-06-27 16:56:20 +02:00
parent 1d7b32b789
commit 2a5cbf9b22

View File

@ -9,10 +9,10 @@ inline auto RestoreRemoteChecksumsFromSaveGame = p_RestoreRemoteChecksumsFromSav
/* CHANGE THESE WHEN SWITCHING TO PYLONV2 TO UNSIGNED AGAIN!*/
#ifndef CLIENT_DLL
inline int32_t* g_nServerRemoteChecksum = nullptr;
inline uint32_t* g_nServerRemoteChecksum = nullptr;
#endif // !CLIENT_DLL
#ifndef DEDICATED
inline int32_t* g_nClientRemoteChecksum = nullptr;
inline uint32_t* g_nClientRemoteChecksum = nullptr;
#endif // !DEDICATED
namespace VSquirrel
@ -78,10 +78,10 @@ class VSqInit : public IDetour
virtual void GetVar(void) const
{
#ifndef CLIENT_DLL
g_nServerRemoteChecksum = p_RestoreRemoteChecksumsFromSaveGame.Offset(0x1C0).FindPatternSelf("48 8D 15", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x3, 0x7).RCast<int32_t*>();
g_nServerRemoteChecksum = p_RestoreRemoteChecksumsFromSaveGame.Offset(0x1C0).FindPatternSelf("48 8D 15", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x3, 0x7).RCast<uint32_t*>();
#endif // !CLIENT_DLL
#ifndef DEDICATED
g_nClientRemoteChecksum = p_Script_Remote_BeginRegisteringFunctions.Offset(0x0).FindPatternSelf("89 05", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast<int32_t*>();
g_nClientRemoteChecksum = p_Script_Remote_BeginRegisteringFunctions.Offset(0x0).FindPatternSelf("89 05", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x2, 0x6).RCast<uint32_t*>();
#endif // !DEDICATED
}
virtual void GetCon(void) const { }