bool locked_goal = false;
- if(this.goalentity.bot_pickup)
+ if(this.goalentity && wasfreed(this.goalentity))
+ {
+ navigation_clearroute(this);
+ this.bot_strategytime = 0;
+ return;
+ }
+ else if(this.goalentity.bot_pickup)
{
if(this.goalentity.bot_pickup_respawning)
{
m1 = org + this.mins;
m2 = org + this.maxs;
- while(this.goalcurrent && wasfreed(this.goalcurrent))
- navigation_poproute(this);
-
if(this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT)
{
// make sure jumppad is really hit, don't rely on distance based checks