#include "waypoints.qh"
+#include <server/defs.qh>
+#include <server/miscfunctions.qh>
#include "cvars.qh"
#include "bot.qh"
if(!found)
{
if(!removal_mode)
- LOG_INFO(strcat("NOTICE: Can not find waypoint at ", vtos(wp_from_pos), ". Path skipped\n"));
+ LOG_INFO("NOTICE: Can not find waypoint at ", vtos(wp_from_pos), ". Path skipped\n");
continue;
}
}
if(!found)
{
if(!removal_mode)
- LOG_INFO(strcat("NOTICE: Can not find waypoint at ", vtos(wp_to_pos), ". Path skipped\n"));
+ LOG_INFO("NOTICE: Can not find waypoint at ", vtos(wp_to_pos), ". Path skipped\n");
continue;
}
int file = fopen(filename, FILE_WRITE);
if (file < 0)
{
- LOG_INFOF("waypoint link save to %s failed\n", filename);
+ LOG_INFOF("waypoint link save to %s failed", filename);
return;
}
fclose(file);
botframe_cachedwaypointlinks = true;
- LOG_INFOF("saved %d waypoint links to maps/%s.waypoints.cache\n", c, mapname);
+ LOG_INFOF("saved %d waypoint links to maps/%s.waypoints.cache", c, mapname);
waypoint_load_links_hardwired();
}
waypoint_save_links(); // save anyway?
botframe_loadedforcedlinks = false;
- LOG_INFOF("waypoint links: save to %s failed\n", filename);
+ LOG_INFOF("waypoint links: save to %s failed", filename);
return;
}
waypoint_save_links();
botframe_loadedforcedlinks = false;
- LOG_INFOF("saved %d waypoints to maps/%s.waypoints\n", c, mapname);
+ LOG_INFOF("saved %d waypoints to maps/%s.waypoints", c, mapname);
}
// load waypoints from file
IL_EACH(g_waypoints, !(it.wpflags & (WAYPOINTFLAG_USEFUL | WAYPOINTFLAG_DEAD_END)),
{
- LOG_INFOF("Removed a waypoint at %v. Try again for more!\n", it.origin);
+ LOG_INFOF("Removed a waypoint at %v. Try again for more!", it.origin);
te_explosion(it.origin);
waypoint_remove(it);
break;
void botframe_autowaypoints()
{
- FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && !IS_DEAD(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it) && !IS_DEAD(it), {
// going back is broken, so only fix waypoints to walk TO the player
//botframe_autowaypoints_fix(p, false, botframe_autowaypoints_lastwp0);
botframe_autowaypoints_fix(it, true, botframe_autowaypoints_lastwp1);
//te_explosion(p.botframe_autowaypoints_lastwp0.origin);
- ));
+ });
if (autocvar_g_waypointeditor_auto >= 2) {
botframe_deleteuselesswaypoints();