[saco] Match CLocalPlayer::FUNC_10005BF0; the guards must nest, sequential returns each emit their own BitStream dtor

This commit is contained in:
ricardoofnl
2026-09-04 22:26:59 +07:00
parent 4def6b65da
commit c2a7c3ad17
4 changed files with 34 additions and 0 deletions
+1
View File
@@ -23,6 +23,7 @@ public:
void InterpolateLookAt(VECTOR *vecFrom, VECTOR *vecTo, int iTime, BYTE byteCut);
void FUNC_1009D660(CEntity *pEntity);
void FUNC_1009D6B0();
void FUNC_1009D740(); // .text:1009D740
float GetDistanceFromPoint(VECTOR *vecPos);
CCamera() {
+1
View File
@@ -124,6 +124,7 @@ public:
~CPlayerPed();
int sub_100ADFA0(); // .text:100ADFA0
BOOL FUNC_100ABFC0(); // .text:100ABFC0
void FUNC_100ADFB0(int iLevel); // .text:100ADFB0
int FUNC_100ADC90(); // .text:100ADC90
+3
View File
@@ -87,6 +87,9 @@ public:
void FUNC_100B81A0(); // .text:100B81A0
void FUNC_100B81F0(); // .text:100B81F0
BOOL FUNC_100B7460(); // .text:100B7460
BOOL FUNC_100B7E00(); // .text:100B7E00
};
+29
View File
@@ -228,3 +228,32 @@ void CLocalPlayer::SelectPreviousClass()
pGame->m_pGameAudio->PlaySound(1053, mat.pos.X, mat.pos.Y, mat.pos.Z);
RequestClass(field_2FE);
}
//----------------------------------------------------
// leaving a vehicle; every guard shares one exit so the nesting has to stay
void CLocalPlayer::FUNC_10005BF0(WORD a1)
{
RakNet::BitStream bsSend;
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
if(a1 < MAX_VEHICLES && pVehiclePool->field_3074[a1])
{
int pVehicle = pVehiclePool->field_1134[a1];
if(pVehicle)
{
if(!m_pPlayerPed->FUNC_100ABFC0())
field_FA = a1;
if(((CVehicle *)pVehicle)->FUNC_100B7460())
pGame->m_pGameCamera->FUNC_1009D740();
if(!((CVehicle *)pVehicle)->FUNC_100B7E00())
{
bsSend.Write(a1);
pNetGame->GetRakClient()->RPC(RPC_ExitVehicle, &bsSend, HIGH_PRIORITY, RELIABLE_SEQUENCED, 0, FALSE);
}
}
}
}