[saco] Match CUnkClass10::GetField80, the third accessor COMDAT; its inlined call site is inside FUNC_10002FA0

This commit is contained in:
ricardoofnl
2026-09-05 10:32:26 +07:00
parent 4750c5994f
commit f6708ef126
4 changed files with 49 additions and 0 deletions
+1
View File
@@ -147,6 +147,7 @@ public:
void FUNC_100AC410(DWORD dwGtaId, int a2); // .text:100AC410
void FUNC_100ADFB0(int iLevel); // .text:100ADFB0
int FUNC_100ADC90(); // .text:100ADC90
void FUNC_100ADFD0(char *szName, int a2, int a3, int a4, VECTOR *pvecPos, int a6, float a7, int a8, int a9, int a10); // .text:100ADFD0
void FUNC_100ABF10(float fAngle); // .text:100ABF10
+44
View File
@@ -2,11 +2,13 @@
#include "../main.h"
#include "../game/util.h"
#include "../game/keystuff.h"
#include "../game/aimstuff.h"
extern CGame *pGame;
extern CNetGame *pNetGame;
extern CCmdWindow *pCmdWindow;
extern CUnkClass3 *pUnkClass3;
extern CUnkClass10 *pUnkClass10;
extern CDXUTDialog *pClassSelectDialog;
DWORD dword_100FE0A4 = -1;
@@ -739,3 +741,45 @@ void CLocalPlayer::FUNC_10006100()
SelectNextClass();
}
}
//----------------------------------------------------
// keeps the FollowPedSA marker on the aim point, refreshed five times a second
void CLocalPlayer::FUNC_10002FA0()
{
if(m_pPlayerPed && (!pGame || pGame->m_bHeadMove) && !m_pPlayerPed->FUNC_100ADC90()
&& (!pUnkClass10 || !pUnkClass10->GetField80()))
{
MATRIX4X4 mat;
m_pPlayerPed->GetMatrix(&mat);
DWORD dwTick = GetTickCount();
if(dwTick - field_137 > 1000)
{
CAMERA_AIM *pAim = GameGetInternalAim();
float fX = pAim->f1x * 20.0f + mat.pos.X;
float fY = pAim->f1y * 20.0f + mat.pos.Y;
float fZ = pAim->f1z * 20.0f + mat.pos.Z;
field_137 = dwTick;
*(float *)&field_12B[0] = fX - mat.pos.X;
*(float *)&field_12B[4] = fY - mat.pos.Y;
*(float *)&field_12B[8] = fZ - mat.pos.Z;
}
if(dwTick - field_13B > 200)
{
VECTOR vecTarget;
vecTarget.X = mat.pos.X + *(float *)&field_12B[0];
vecTarget.Y = mat.pos.Y + *(float *)&field_12B[4];
vecTarget.Z = mat.pos.Z + *(float *)&field_12B[8];
m_pPlayerPed->FUNC_100ADFD0("FollowPedSA", 0, 2000, -1, &vecTarget, 0, 0.1f, 500, 3, 0);
field_13B = dwTick;
}
}
}
+1
View File
@@ -151,6 +151,7 @@ public:
void FUNC_10004080(); // .text:10004080
void FUNC_10004230(WORD a1); // .text:10004230
void FUNC_10004280(PLAYERID playerId); // .text:10004280
void FUNC_10002FA0(); // .text:10002FA0
void FUNC_10006100(); // .text:10006100
void SendDeath(); // .text:10005810
void SetInteriorId(BYTE byteInteriorId); // .text:10005970
+3
View File
@@ -29,6 +29,9 @@ private:
int field_113;
public:
int GetField80() { return field_80; }; // .text:10002E70, out of line copy
CUnkClass10(IDirect3DDevice9 *pD3DDevice);
float FUNC_10071C20(D3DXVECTOR3 *pPos, D3DXVECTOR2 *pOut);