diff --git a/saco/game/playerped.cpp b/saco/game/playerped.cpp index cc49bd3..3c4b1ee 100644 --- a/saco/game/playerped.cpp +++ b/saco/game/playerped.cpp @@ -18,6 +18,15 @@ extern BOOL bIgnoreNextExit; extern BYTE *pbyteCurrentPlayer; extern int iGtaVersion; +// all three live in the translation unit at 0x100A4xxx, which also reads them +extern int VAR_10151658; +extern int VAR_1015165C; +extern float VAR_10151660; + +// .text:1009CFD0, lives in another translation unit; it returns -1 when the lookup +// fails, so the return has to be signed +short FUNC_1009CFD0(int a1); + typedef char CPlayerPed_size_probe[sizeof(CPlayerPed) == 0x32D ? 1 : -1]; typedef char CPlayerPed_2BD_probe[offsetof(CPlayerPed, field_2BD) == 0x2BD ? 1 : -1]; @@ -2325,3 +2334,11 @@ void CPlayerPed::FUNC_100AD440() field_2B9 = 0; } //----------------------------------------------------------- + +DWORD CPlayerPed::FUNC_100AE6A0() +{ + short sIndex = FUNC_1009CFD0(FUNC_100B4430(VAR_10151658, VAR_1015165C)); + + return (((BYTE)VAR_10151660 | 0xFFFF8000) << 16) | sIndex; +} +//----------------------------------------------------------- diff --git a/saco/game/playerped.h b/saco/game/playerped.h index 693e6bb..72a91fe 100644 --- a/saco/game/playerped.h +++ b/saco/game/playerped.h @@ -261,6 +261,7 @@ public: void FUNC_100AD440(); // .text:100AD440 + int m_iCellPhoneEnabled; int field_4C[10]; struc_97 field_74[10];