X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fwaypoints.qc;h=ca209f9ca7ab4877c3ef0036c2d3756cf076a06f;hp=627c622d2554de6f9b3a6015f5d8ffaebb2e7066;hb=86c9dc7c3696c329496b06375c1e79fb407401ce;hpb=5733b1493c8c3fc14830f78122fe388e89f19338 diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index 627c622d2..ca209f9ca 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -43,7 +43,7 @@ entity waypoint_spawn(vector m1, vector m2, float f) { if(!(f & WAYPOINTFLAG_GENERATED)) { - dprint("Killed a waypoint that was stuck in solid at ", vtos(w.origin), "\n"); + LOG_TRACE("Killed a waypoint that was stuck in solid at ", vtos(w.origin), "\n"); remove(w); return world; } @@ -51,7 +51,7 @@ entity waypoint_spawn(vector m1, vector m2, float f) { if(autocvar_developer) { - print("A generated waypoint is stuck in solid at ", vtos(w.origin), "\n"); + LOG_INFO("A generated waypoint is stuck in solid at ", vtos(w.origin), "\n"); backtrace("Waypoint stuck"); } } @@ -381,9 +381,9 @@ float waypoint_load_links() if (file < 0) { - dprint("waypoint links load from "); - dprint(filename); - dprint(" failed\n"); + LOG_TRACE("waypoint links load from "); + LOG_TRACE(filename); + LOG_TRACE(" failed\n"); return false; } @@ -419,7 +419,7 @@ float waypoint_load_links() if(!found) { - dprint("waypoint_load_links: couldn't find 'from' waypoint at ", vtos(wp_from.origin),"\n"); + LOG_TRACE("waypoint_load_links: couldn't find 'from' waypoint at ", vtos(wp_from.origin),"\n"); continue; } @@ -441,7 +441,7 @@ float waypoint_load_links() if(!found) { - dprint("waypoint_load_links: couldn't find 'to' waypoint at ", vtos(wp_to.origin),"\n"); + LOG_TRACE("waypoint_load_links: couldn't find 'to' waypoint at ", vtos(wp_to.origin),"\n"); continue; } @@ -451,11 +451,11 @@ float waypoint_load_links() fclose(file); - dprint("loaded "); - dprint(ftos(c)); - dprint(" waypoint links from maps/"); - dprint(mapname); - dprint(".waypoints.cache\n"); + LOG_TRACE("loaded "); + LOG_TRACE(ftos(c)); + LOG_TRACE(" waypoint links from maps/"); + LOG_TRACE(mapname); + LOG_TRACE(".waypoints.cache\n"); botframe_cachedwaypointlinks = true; return true; @@ -475,9 +475,9 @@ void waypoint_load_links_hardwired() if (file < 0) { - dprint("waypoint links load from "); - dprint(filename); - dprint(" failed\n"); + LOG_TRACE("waypoint links load from "); + LOG_TRACE(filename); + LOG_TRACE(" failed\n"); return; } @@ -515,7 +515,7 @@ void waypoint_load_links_hardwired() if(!found) { - print(strcat("NOTICE: Can not find waypoint at ", vtos(wp_from_pos), ". Path skipped\n")); + LOG_INFO(strcat("NOTICE: Can not find waypoint at ", vtos(wp_from_pos), ". Path skipped\n")); continue; } } @@ -536,7 +536,7 @@ void waypoint_load_links_hardwired() if(!found) { - print(strcat("NOTICE: Can not find waypoint at ", vtos(wp_to_pos), ". Path skipped\n")); + LOG_INFO(strcat("NOTICE: Can not find waypoint at ", vtos(wp_to_pos), ". Path skipped\n")); continue; } @@ -548,11 +548,11 @@ void waypoint_load_links_hardwired() fclose(file); - dprint("loaded "); - dprint(ftos(c)); - dprint(" waypoint links from maps/"); - dprint(mapname); - dprint(".waypoints.hardwired\n"); + LOG_TRACE("loaded "); + LOG_TRACE(ftos(c)); + LOG_TRACE(" waypoint links from maps/"); + LOG_TRACE(mapname); + LOG_TRACE(".waypoints.hardwired\n"); } entity waypoint_get_link(entity w, float i) @@ -606,9 +606,9 @@ void waypoint_save_links() file = fopen(filename, FILE_WRITE); if (file < 0) { - print("waypoint links save to "); - print(filename); - print(" failed\n"); + LOG_INFO("waypoint links save to "); + LOG_INFO(filename); + LOG_INFO(" failed\n"); } c = 0; w = findchain(classname, "waypoint"); @@ -630,11 +630,11 @@ void waypoint_save_links() fclose(file); botframe_cachedwaypointlinks = true; - print("saved "); - print(ftos(c)); - print(" waypoints links to maps/"); - print(mapname); - print(".waypoints.cache\n"); + LOG_INFO("saved "); + LOG_INFO(ftos(c)); + LOG_INFO(" waypoints links to maps/"); + LOG_INFO(mapname); + LOG_INFO(".waypoints.cache\n"); } // save waypoints to gamedir/data/maps/mapname.waypoints @@ -712,19 +712,19 @@ float waypoint_loadall() cwb = cwb + 1; } fclose(file); - dprint("loaded "); - dprint(ftos(cwp)); - dprint(" waypoints and "); - dprint(ftos(cwb)); - dprint(" wayboxes from maps/"); - dprint(mapname); - dprint(".waypoints\n"); + LOG_TRACE("loaded "); + LOG_TRACE(ftos(cwp)); + LOG_TRACE(" waypoints and "); + LOG_TRACE(ftos(cwb)); + LOG_TRACE(" wayboxes from maps/"); + LOG_TRACE(mapname); + LOG_TRACE(".waypoints\n"); } else { - dprint("waypoint load from "); - dprint(filename); - dprint(" failed\n"); + LOG_TRACE("waypoint load from "); + LOG_TRACE(filename); + LOG_TRACE(" failed\n"); } return cwp + cwb; } @@ -967,7 +967,7 @@ float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp, .en } if(bestdist < maxdist) { - print("update chain to new nearest WP ", etos(p.(fld)), "\n"); + LOG_INFO("update chain to new nearest WP ", etos(p.(fld)), "\n"); return 0; } @@ -1046,7 +1046,7 @@ float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp, .en tmax = t; } - print("spawning a waypoint for connecting to ", etos(wp), "\n"); + LOG_INFO("spawning a waypoint for connecting to ", etos(wp), "\n"); botframe_autowaypoints_createwp(o, p, fld, 0); return 1; } @@ -1062,7 +1062,7 @@ void botframe_autowaypoints_fix(entity p, float walkfromwp, .entity fld) if(r != -1) return; - print("emergency: got no good nearby WP to build a link from, starting a new chain\n"); + LOG_INFO("emergency: got no good nearby WP to build a link from, starting a new chain\n"); if(!botframe_autowaypoints_fixdown(p.origin)) return; // shouldn't happen, caught above botframe_autowaypoints_createwp(trace_endpos, p, fld, WAYPOINTFLAG_PROTECTED); @@ -1140,7 +1140,7 @@ void botframe_deleteuselesswaypoints() { if (!(w.wpflags & (WAYPOINTFLAG_USEFUL | WAYPOINTFLAG_DEAD_END))) { - printf("Removed a waypoint at %v. Try again for more!\n", w.origin); + LOG_INFOF("Removed a waypoint at %v. Try again for more!\n", w.origin); te_explosion(w.origin); waypoint_remove(w); break;