removed bad code bits from pathfinding
fixed too long duck pressing in combat restore bits of player avoidance code
This commit is contained in:
parent
fa3efb431f
commit
1b1ae9ea91
7 changed files with 196 additions and 207 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue