// If for some reason the bot is closer to the next goal, pop the current one
if(this.goalstack01)
- if(vlen(this.goalcurrent.origin - this.origin) > vlen(this.goalstack01.origin - this.origin))
+ if(vlen2(this.goalcurrent.origin - this.origin) > vlen2(this.goalstack01.origin - this.origin))
if(checkpvs(this.origin + this.view_ofs, this.goalstack01))
if(tracewalk(this, this.origin, this.mins, this.maxs, (this.goalstack01.absmin + this.goalstack01.absmax) * 0.5, bot_navigation_movemode))
{