[saco] Implement/match CGame::DisableEnterExits()

This commit is contained in:
RD42 2024-08-14 23:08:30 +08:00
parent e79a03a240
commit fe3c24967d
2 changed files with 24 additions and 0 deletions

View File

@ -959,3 +959,26 @@ void CGame::EnableStuntBonus(bool bEnable)
//----------------------------------------------------------- //-----------------------------------------------------------
void CGame::DisableEnterExits()
{
DWORD pEnExPool = *(DWORD *)0x96A7D8;
DWORD pEnExEntries = *(DWORD *)pEnExPool;
int iNumEnEx=0;
int x=0;
_asm mov ecx, pEnExPool
_asm mov eax, [ecx+8]
_asm mov iNumEnEx, eax
BYTE *pEnExPoolSlot;
while(x!=iNumEnEx) {
pEnExPoolSlot = (((BYTE *)pEnExEntries) + (60*x));
_asm mov eax, pEnExPoolSlot
_asm and word ptr [eax+48], 0
x++;
}
}
//-----------------------------------------------------------

View File

@ -108,6 +108,7 @@ public:
int GetScreenHeight() { return *(int*)0xC17048; }; int GetScreenHeight() { return *(int*)0xC17048; };
DWORD GetWeaponInfo(int iWeapon, int iUnk); DWORD GetWeaponInfo(int iWeapon, int iUnk);
void DisableEnterExits();
CGame(); CGame();