break;
}
- if (!(pointcontents(org + '0 0 1') == CONTENT_EMPTY))
+ if(pointcontents(org + '0 0 1') != CONTENT_EMPTY)
{
if(autocvar_bot_debug_tracewalk)
debugnodestatus(org, DEBUG_NODE_FAIL);
if (autocvar_g_waypointeditor_auto)
{
entity wp2 = navigation_findnearestwaypoint_withdist_except(ent, walkfromwp, 1050, wp);
- if (!wp2)
+ if (wp && !wp2)
wp.wpflags |= WAYPOINTFLAG_PROTECTED;
}
return wp;