]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/navigation.qc
Move check for freed goals to navigation_poptouchedgoals
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / navigation.qc
index 0e4243de6a5bfc51737d09614705e0661123c2c8..83077e1d400707a97c757599082b426bc656937c 100644 (file)
@@ -876,6 +876,9 @@ void navigation_poptouchedgoals(entity this)
        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