mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-10 03:33:04 +08:00
[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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; };
|
||||
|
||||
Reference in New Issue
Block a user