bot.cpp line 5704:
Code:
pBot->vecLookAt = paths[pBot->prev_wpt_index[0]]->origin + pBot->pEdict->v.view_ofs;
The line You are refering to is concerning to the situation - the bot looks at the wall at it's very near to it, but he could look at the previous Waypoint's origin (so he should look backward instead looking at the wall).
This what You are asking for (to don't look at the waypoint's origin if the bot is very near it) is already included in lines very close to this 5704.
bot.cpp line 5752:
Code:
if ((pBot->dest_origin != g_vecZero)
&& ((pBot->fChangeAimDirectionTime < gpGlobals->time) && (!bDestAimingSelected)
&& ( (pBot->cCollisionState != COLLISION_PROBING)
|| ((pBot->cCollideMoves[(int) pBot->cCollStateIndex] != COLLISION_STRAFELEFT)
&& (pBot->cCollideMoves[(int) pBot->cCollStateIndex] != COLLISION_STRAFERIGHT)
&& (pBot->cCollideMoves[(int) pBot->cCollStateIndex] != COLLISION_GOBACK))))) // KWo - 29.09.2010
{
if ((pBot->dest_origin - pBot->pEdict->v.origin).Length() > 15)
pBot->vecLookAt = pBot->dest_origin + pBot->pEdict->v.view_ofs;
else
{
MAKE_VECTORS (pEdict->v.v_angle);
pBot->vecLookAt = pBot->pEdict->v.origin + pBot->pEdict->v.view_ofs + gpGlobals->v_forward * 300;
}
}
That should keep the bot's vector to look at the the same direction instead at the same point if the bot is very close to the waypoint.