Support for 'yb wp clean' to take neareset to local player waypoint if no arguments passed.

This commit is contained in:
Dmitry 2019-05-07 16:37:12 +03:00 committed by jeefo
commit 17039524dc

View file

@ -373,6 +373,15 @@ int handleBotCommands (edict_t *ent, const char *arg0, const char *arg1, const c
}
}
}
else {
int nearest = waypoints.getEditorNeareset (), totalCleared = 0;
if (waypoints.exists (nearest)) {
totalCleared += waypoints.removeUselessConnections (nearest);
engine.print ("Done. Waypoint %d had %d useless paths.", nearest, totalCleared);
}
}
}
// teleport player to specified waypoint