From aab8ccc89fbdce6c4b7fcafbb0b3d48b719f9245 Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 13 Aug 2019 13:14:43 +0200 Subject: [PATCH] Reduce LOG_INFO calls in bot waypoint code --- qcsrc/server/bot/default/waypoints.qc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index d69a89400..6bc907701 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -1303,6 +1303,7 @@ float waypoint_loadall() if (autocvar_g_waypointeditor && autocvar_g_waypointeditor_symmetrical_allowload) { + string sym_str = ""; cvar_set("g_waypointeditor_symmetrical", ftos(sym)); if (sym == 1 && sym_param3 < 2) cvar_set("g_waypointeditor_symmetrical_order", "0"); // make sure this is reset if not loaded @@ -1317,16 +1318,18 @@ float waypoint_loadall() cvar_set("g_waypointeditor_symmetrical_origin", params); } cvar_set("g_waypointeditor_symmetrical_order", ftos(sym_param3)); - LOG_INFO("Waypoint editor: loaded symmetry ", ftos(sym), " with origin ", params, " and order ", ftos(sym_param3)); + sym_str = strcat(ftos(sym), " with origin ", params, " and order ", ftos(sym_param3)); } else if (sym == -2) { string params = strcat(ftos(sym_param1), " ", ftos(sym_param2)); cvar_set("g_waypointeditor_symmetrical_axis", params); - LOG_INFO("Waypoint editor: loaded symmetry ", ftos(sym), " with axis ", params); + sym_str = strcat(ftos(sym), " with axis ", params); } else - LOG_INFO("Waypoint editor: loaded symmetry ", ftos(sym)); + sym_str = ftos(sym); + if (sym_str != "") + LOG_INFO("Waypoint editor: loaded symmetry ", sym_str); LOG_INFO(strcat("g_waypointeditor_symmetrical", " has been set to ", cvar_string("g_waypointeditor_symmetrical"))); } -- 2.39.2