mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 01:00:00 +00:00
little fix
This commit is contained in:
parent
4ffa585cce
commit
c559b71bc9
|
@ -13363,7 +13363,7 @@ CPed::ProcessObjective(void)
|
||||||
if (m_pMyVehicle) {
|
if (m_pMyVehicle) {
|
||||||
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = 0;
|
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = 0;
|
||||||
} else {
|
} else {
|
||||||
float closestVehDist = 3600.0f;
|
float closestVehDist = SQR(60.0f);
|
||||||
int16 lastVehicle;
|
int16 lastVehicle;
|
||||||
CEntity* vehicles[8];
|
CEntity* vehicles[8];
|
||||||
CWorld::FindObjectsInRange(GetPosition(), 25.0f, true, &lastVehicle, 6, vehicles, false, true, false, false, false);
|
CWorld::FindObjectsInRange(GetPosition(), 25.0f, true, &lastVehicle, 6, vehicles, false, true, false, false, false);
|
||||||
|
@ -13376,11 +13376,11 @@ CPed::ProcessObjective(void)
|
||||||
CVector ourSpeed = GetSpeed();
|
CVector ourSpeed = GetSpeed();
|
||||||
*/
|
*/
|
||||||
CVector vehDistVec = nearVeh->GetPosition() - GetPosition();
|
CVector vehDistVec = nearVeh->GetPosition() - GetPosition();
|
||||||
if (vehDistVec.Magnitude() < closestVehDist
|
if (vehDistVec.MagnitudeSqr() < closestVehDist
|
||||||
&& m_pedInObjective->m_pMyVehicle != nearVeh)
|
&& m_pedInObjective->m_pMyVehicle != nearVeh)
|
||||||
{
|
{
|
||||||
foundVeh = nearVeh;
|
foundVeh = nearVeh;
|
||||||
closestVehDist = vehDistVec.Magnitude();
|
closestVehDist = vehDistVec.MagnitudeSqr();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_pMyVehicle = foundVeh;
|
m_pMyVehicle = foundVeh;
|
||||||
|
|
Loading…
Reference in a new issue