[saco] Match CPlayerPed::PutDirectlyInVehicle; retail tests the 0xFFFF pool sentinel before MAX_VEHICLES

This commit is contained in:
ricardoofnl committed 2026-09-03 01:33:32 +07:00
1 parent 6a287f55f4
commit 5709b2c351
1 file changed
+2 -1
+2 -1
View File
@@ -823,7 +823,8 @@ void CPlayerPed::PutDirectlyInVehicle(int iVehicleID, int iSeat)
if(pNetGame) {
CVehiclePool* pVehiclePool = pNetGame->GetVehiclePool();
VEHICLEID TrainVehicleId = pVehiclePool->FUNC_1001EB90((int)pVehicle);
if(TrainVehicleId > MAX_VEHICLES) return;
// 0xFFFF is the vehicle pool not-found sentinel
if(TrainVehicleId == 0xFFFF || TrainVehicleId > MAX_VEHICLES) return;
CVehicle* pTrain = (CVehicle *)pVehiclePool->FUNC_10001120(TrainVehicleId);
if ( pTrain && pTrain->IsATrainPart() && m_pPed == GamePool_FindPlayerPed() ) {