mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-12 02:08:14 +08:00
[saco] Match CPlayerPed::PutDirectlyInVehicle; retail tests the 0xFFFF pool sentinel before MAX_VEHICLES
This commit is contained in:
1 parent
6a287f55f4
commit
5709b2c351
1 file changed
+2
-1
@@ -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() ) {
|
||||
|
||||
Reference in new issue
Block a user