[saco] Match FUNC_10003FC0, the in-vehicle boundary check; the id is tested against INVALID_VEHICLE_ID before the range

This commit is contained in:
ricardoofnl
2026-09-05 09:33:28 +07:00
parent 5baa271d74
commit 8163d2e5ee
2 changed files with 21 additions and 0 deletions
+20
View File
@@ -587,3 +587,23 @@ void CLocalPlayer::FUNC_10004280(PLAYERID playerId)
field_314 = 0;
}
}
//----------------------------------------------------
// the in-vehicle half of the boundary check, keyed off the driven vehicle
void CLocalPlayer::FUNC_10003FC0()
{
CVehiclePool *pVehiclePool = pNetGame->GetVehiclePool();
WORD wVehicleId = pVehiclePool->FUNC_1001EB90((int)m_pPlayerPed->GetGtaVehicle());
if(!pGame->FUNC_100A0EE0() && wVehicleId != INVALID_VEHICLE_ID && wVehicleId < MAX_VEHICLES
&& pVehiclePool->field_3074[wVehicleId])
{
CVehicle *pVehicle = (CVehicle *)pVehiclePool->field_1134[wVehicleId];
if(pVehicle && pVehicle->FUNC_1009F420(pNetGame->GetSettings()->fWorldBoundryPX,
pNetGame->GetSettings()->fWorldBoundryZX, pNetGame->GetSettings()->fWorldBoundryPY,
pNetGame->GetSettings()->fWorldBoundryNY))
pGame->DisplayGameText("Stay within the ~r~world boundries", 1000, 5);
}
}
+1
View File
@@ -153,6 +153,7 @@ public:
void FUNC_10004230(WORD a1); // .text:10004230
void FUNC_10004280(PLAYERID playerId); // .text:10004280
void FUNC_10003F50(); // .text:10003F50
void FUNC_10003FC0(); // .text:10003FC0
void FUNC_100041C0(BOOL bSpectating); // .text:100041C0
DWORD GetField_F0() { return field_F0; };