[saco] Match CLocalPlayer::FUNC_10005AD0; the flag byte comes from a branch not setne, and the GTA id needs its own local to reuse esi

This commit is contained in:
ricardoofnl
2026-09-04 22:40:47 +07:00
parent c2a7c3ad17
commit 773bf14843
2 changed files with 34 additions and 0 deletions
+33
View File
@@ -5,6 +5,8 @@
extern CGame *pGame;
extern CNetGame *pNetGame;
DWORD dword_100FE0A4;
//----------------------------------------------------------
CLocalPlayer::CLocalPlayer()
@@ -257,3 +259,34 @@ void CLocalPlayer::FUNC_10005BF0(WORD a1)
}
}
}
//----------------------------------------------------
// entering a vehicle; the camera hand-off only runs for the vehicles that ask
void CLocalPlayer::FUNC_10005AD0(WORD a1, int a2)
{
RakNet::BitStream bsSend;
BYTE byteFlag = 0;
if(a2)
byteFlag = 1;
bsSend.Write(a1);
bsSend.Write(byteFlag);
pNetGame->GetRakClient()->RPC(RPC_EnterVehicle, &bsSend, HIGH_PRIORITY, RELIABLE_SEQUENCED, 0, FALSE);
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
if(a1 < MAX_VEHICLES && pVehiclePool->field_3074[a1])
{
CVehicle *pVehicle = (CVehicle *)pVehiclePool->field_1134[a1];
if(pVehicle && pVehicle->FUNC_100B7460())
{
DWORD dwGtaId = pVehicle->m_dwGTAId;
ScriptCommand(&camera_on_vehicle, dwGtaId, 3, 2);
dword_100FE0A4 = GetTickCount();
}
}
}
+1
View File
@@ -122,6 +122,7 @@ public:
void SelectPreviousClass(); // .text:10006080
void RequestClass(int iClass); // .text:100058D0
void SendStatsUpdate(); // .text:10005D00
void FUNC_10005AD0(WORD a1, int a2); // .text:10005AD0
void FUNC_10005BF0(WORD a1); // .text:10005BF0
void FUNC_10003570(); // .text:10003570