summaryrefslogtreecommitdiffstats
path: root/src/entities/Ped.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/entities/Ped.cpp')
-rw-r--r--src/entities/Ped.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/entities/Ped.cpp b/src/entities/Ped.cpp
index 10de9fa8..a80fc770 100644
--- a/src/entities/Ped.cpp
+++ b/src/entities/Ped.cpp
@@ -509,11 +509,11 @@ CPed::OurPedCanSeeThisOne(CEntity *target)
// Check if target is behind ped
if (DotProduct2D(dist, CVector2D(this->GetForward())) < 0.0f)
- return 0;
+ return false;
// Check if target is too far away
- if (dist.Magnitude() < 40.0f)
- return 0;
+ if (dist.Magnitude() >= 40.0f)
+ return false;
// Check line of sight from head
CVector headPos = this->GetPosition();