summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Ped.cpp6
-rw-r--r--src/peds/PedChat.cpp6
-rw-r--r--src/peds/Population.cpp3
3 files changed, 7 insertions, 8 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index c675b7e5..165436b5 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -14611,7 +14611,7 @@ CPed::ProcessObjective(void)
if (m_pMyVehicle) {
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = 0;
} else {
- float closestVehDist = 3600.0f;
+ float closestVehDist = SQR(60.0f);
int16 lastVehicle;
CEntity* vehicles[8];
CWorld::FindObjectsInRange(GetPosition(), 25.0f, true, &lastVehicle, 6, vehicles, false, true, false, false, false);
@@ -14624,11 +14624,11 @@ CPed::ProcessObjective(void)
CVector ourSpeed = GetSpeed();
*/
CVector vehDistVec = nearVeh->GetPosition() - GetPosition();
- if (vehDistVec.Magnitude() < closestVehDist
+ if (vehDistVec.MagnitudeSqr() < closestVehDist
&& m_pedInObjective->m_pMyVehicle != nearVeh)
{
foundVeh = nearVeh;
- closestVehDist = vehDistVec.Magnitude();
+ closestVehDist = vehDistVec.MagnitudeSqr();
}
}
m_pMyVehicle = foundVeh;
diff --git a/src/peds/PedChat.cpp b/src/peds/PedChat.cpp
index 4480a8cd..73a8e59c 100644
--- a/src/peds/PedChat.cpp
+++ b/src/peds/PedChat.cpp
@@ -131,9 +131,9 @@ CPed::Say(uint16 audio)
case SOUND_PED_FLEE_SPRINT:
case SOUND_PED_TAXI_WAIT:
case SOUND_PED_EVADE:
- case SOUND_PED_CAR_COLLISION:
- case SOUND_PED_BOAT_COLLISION:
- case SOUND_PED_HORN_ACTIVE:
+ case SOUND_PED_CRASH_VEHICLE:
+ case SOUND_PED_CRASH_CAR:
+ case SOUND_PED_ANNOYED_DRIVER:
break;
default:
return;
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index f7e0973f..18c1ce04 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -127,8 +127,7 @@ CPopulation::Initialise()
void
CPopulation::RemovePed(CPed *ent)
{
- // CPed dtor already does that
- // CWorld::Remove((CEntity*)ent);
+ CWorld::Remove((CEntity*)ent);
delete ent;
}