removed bad code bits from pathfinding

fixed too long duck pressing in combat
restore bits of player avoidance code
This commit is contained in:
Dmitry 2015-06-06 14:19:19 +03:00
commit 1b1ae9ea91
7 changed files with 196 additions and 207 deletions

View file

@ -110,11 +110,11 @@ int Waypoint::FindNearest (Vector origin, float minDistance, int flags)
for (int i = 0; i < g_numWaypoints; i++)
{
float distance = (m_paths[i]->origin - origin).GetLength ();
if (flags != -1 && !(m_paths[i]->flags & flags))
continue; // if flag not -1 and waypoint has no this flag, skip waypoint
float distance = (m_paths[i]->origin - origin).GetLength ();
if (distance < minDistance)
{
index = i;