summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-26 11:35:34 +0200
committeraap <aap@papnet.eu>2019-06-26 11:35:34 +0200
commitb19e1d369ce71681ac48c9e8bbce8f419261ac77 (patch)
treeeacee2b0cf219fc301b64db22c96fb7eea3b8709 /src
parentMerge pull request #51 from gennariarmando/master (diff)
downloadre3-b19e1d369ce71681ac48c9e8bbce8f419261ac77.tar
re3-b19e1d369ce71681ac48c9e8bbce8f419261ac77.tar.gz
re3-b19e1d369ce71681ac48c9e8bbce8f419261ac77.tar.bz2
re3-b19e1d369ce71681ac48c9e8bbce8f419261ac77.tar.lz
re3-b19e1d369ce71681ac48c9e8bbce8f419261ac77.tar.xz
re3-b19e1d369ce71681ac48c9e8bbce8f419261ac77.tar.zst
re3-b19e1d369ce71681ac48c9e8bbce8f419261ac77.zip
Diffstat (limited to 'src')
-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();