1
0
mirror of https://github.com/td512/re3.git synced 2026-01-27 22:47:10 +00:00

fixed bug in CPed

This commit is contained in:
aap
2019-06-26 11:35:34 +02:00
parent f9e7e9c3c3
commit b19e1d369c

View File

@@ -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();