From: terencehill Date: Fri, 15 Feb 2019 17:47:22 +0000 (+0100) Subject: When possible use simpler LOG_* macros instead of LOG_*F X-Git-Tag: xonotic-v0.8.5~1601 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=057a30619b24b998bb9502aaaf6fd4fc757f9979;p=xonotic%2Fxonotic-data.pk3dir.git When possible use simpler LOG_* macros instead of LOG_*F --- diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index a8a76e471..55b634a62 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -205,8 +205,7 @@ GENERIC_COMMAND(bufstr_get, "Examine a string buffer object") { int bufhandle = stof(argv(1)); int string_index = stof(argv(2)); - string s = bufstr_get(bufhandle, string_index); - LOG_INFOF("%s", s); + LOG_INFO(bufstr_get(bufhandle, string_index)); return; } diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index 6a53e57c2..cbb54cd26 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -540,7 +540,7 @@ void _Movetype_Physics_Frame(entity this, float movedt) { case MOVETYPE_PUSH: case MOVETYPE_FAKEPUSH: - LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!"); + LOG_DEBUG("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!"); break; case MOVETYPE_NONE: break; @@ -582,7 +582,7 @@ void _Movetype_Physics_ClientFrame(entity this, float movedt) { case MOVETYPE_PUSH: case MOVETYPE_FAKEPUSH: - LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!"); + LOG_DEBUG("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!"); break; case MOVETYPE_NONE: break; diff --git a/qcsrc/lib/intrusivelist.qh b/qcsrc/lib/intrusivelist.qh index 9b721a9ba..279210fb1 100644 --- a/qcsrc/lib/intrusivelist.qh +++ b/qcsrc/lib/intrusivelist.qh @@ -212,7 +212,7 @@ void IL_INIT(IntrusiveList this) return; } } - LOG_WARNF("IntrusiveList overflow"); + LOG_WARN("IntrusiveList overflow"); } ERASEABLE diff --git a/qcsrc/menu/command/menu_cmd.qc b/qcsrc/menu/command/menu_cmd.qc index a06ac8e23..93deaff33 100644 --- a/qcsrc/menu/command/menu_cmd.qc +++ b/qcsrc/menu/command/menu_cmd.qc @@ -88,7 +88,7 @@ void GameCommand(string theCommand) if (!startsWith(s, filter)) continue; s = substring(s, strlen(filter), strlen(s) - strlen(filter)); } - LOG_INFOF(" %s", s); + LOG_INFO(" ", s); }); } else if (argc == 2 && !isdemo()) // don't allow this command in demos diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index 1ef4c8c52..9de377987 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -31,7 +31,7 @@ void waypoint_unreachable(entity pl) entity e2 = navigation_findnearestwaypoint(pl, false); if(!e2) { - LOG_INFOF("Can't find any waypoint nearby\n"); + LOG_INFO("Can't find any waypoint nearby\n"); return; } diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index fd0375cb3..6121867e2 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -437,7 +437,7 @@ void CommonCommand_editmob(int request, entity caller, int argc) case "butcher": { if (caller) { print_to(caller, "This command is not available to players"); return; } - if (MUTATOR_CALLHOOK(AllowMobButcher)) { LOG_INFOF("%s", M_ARGV(0, string)); return; } + if (MUTATOR_CALLHOOK(AllowMobButcher)) { LOG_INFO(M_ARGV(0, string)); return; } int tmp_remcount = 0; diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 1a77e4f41..e8fc1b13f 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -794,8 +794,8 @@ void GameCommand_gettaginfo(int request, int argc) { v = gettaginfo(tmp_entity, i); LOG_INFOF( - "model %s frame %s tag %s index %s parent %s", - tmp_entity.model, ftos(tmp_entity.frame), gettaginfo_name, ftos(i), ftos(gettaginfo_parent) + "model %s frame %s tag %s index %s parent %s", + tmp_entity.model, ftos(tmp_entity.frame), gettaginfo_name, ftos(i), ftos(gettaginfo_parent) ); LOG_INFOF(" vector = %s %s %s", ftos(v.x), ftos(v.y), ftos(v.z)); LOG_INFOF(" offset = %s %s %s", ftos(gettaginfo_offset.x), ftos(gettaginfo_offset.y), ftos(gettaginfo_offset.z)); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index cf4128ddd..9ef72ae83 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -640,7 +640,7 @@ spawnfunc(worldspawn) { server_is_dedicated = boolean(stof(cvar_defstring("is_dedicated"))); - bool wantrestart = false; + bool wantrestart = false; { if (!server_is_dedicated) { @@ -695,7 +695,7 @@ spawnfunc(worldspawn) } if (wantrestart) { - LOG_INFOF("Restart requested"); + LOG_INFO("Restart requested"); changelevel(mapname); // let initialization continue, shutdown depends on it } @@ -774,7 +774,7 @@ spawnfunc(worldspawn) readlevelcvars(); GrappleHookInit(); - GameRules_limit_fallbacks(); + GameRules_limit_fallbacks(); if(warmup_limit == 0) warmup_limit = (autocvar_timelimit > 0) ? autocvar_timelimit * 60 : autocvar_timelimit;