diff options
author | aap <aap@papnet.eu> | 2019-06-26 11:35:34 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-06-26 11:35:34 +0200 |
commit | b19e1d369ce71681ac48c9e8bbce8f419261ac77 (patch) | |
tree | eacee2b0cf219fc301b64db22c96fb7eea3b8709 | |
parent | Merge pull request #51 from gennariarmando/master (diff) | |
download | re3-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 |
-rw-r--r-- | src/entities/Ped.cpp | 6 |
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(); |