mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 03:33:04 +08:00
[saco] Implement/match CPlayerPed::FUNC_100AE6A0; the table lookup returns a signed short, which is what sign-extends the low half of the packed result
This commit is contained in:
@@ -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;
|
||||
}
|
||||
//-----------------------------------------------------------
|
||||
|
||||
@@ -261,6 +261,7 @@ public:
|
||||
|
||||
void FUNC_100AD440(); // .text:100AD440
|
||||
|
||||
|
||||
int m_iCellPhoneEnabled;
|
||||
int field_4C[10];
|
||||
struc_97 field_74[10];
|
||||
|
||||
Reference in New Issue
Block a user