default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 cl_cmd blurtest\n");
+ LOG_INFO("Usage:^3 cl_cmd blurtest\n");
LOG_INFO(" No arguments required.\n");
return;
}
}
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 lv_cmd boxparticles effectname own org_from org_to, dir_from, dir_to, countmultiplier, flags\n");
+ LOG_INFO("Usage:^3 lv_cmd boxparticles effectname own org_from org_to, dir_from, dir_to, countmultiplier, flags\n");
LOG_INFO(" 'effectname' is the name of a particle effect in effectinfo.txt\n");
LOG_INFO(" 'own' is the entity number of the owner (negative for csqc ent, positive for svqc ent)\n");
LOG_INFO(" 'org_from' is the starting origin of the box\n");
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 cl_cmd create_scrshot_ent [path]\n");
+ LOG_INFO("Usage:^3 cl_cmd create_scrshot_ent [path]\n");
LOG_INFO(" Where 'path' can be the subdirectory of data/data in which the file is saved.\n");
return;
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 cl_cmd debugmodel model\n");
+ LOG_INFO("Usage:^3 cl_cmd debugmodel model\n");
LOG_INFO(" Where 'model' is a string of the model name to use for the debug model.\n");
return;
}
}
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 cl_cmd handlevote vote\n");
+ LOG_INFO("Usage:^3 cl_cmd handlevote vote\n");
LOG_INFO(" Where 'vote' is the selection for either the current poll or uid2name.\n");
return;
}
}
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 cl_cmd hud action [configname | radartoggle | layout]\n");
+ LOG_INFO("Usage:^3 cl_cmd hud action [configname | radartoggle | layout]\n");
LOG_INFO(" Where 'action' is the command to complete,\n");
LOG_INFO(" 'configname' is the name to save to for \"save\" action,\n");
LOG_INFO(" 'radartoggle' is to control hud_panel_radar_maximized for \"radar\" action,\n");
}
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 cl_cmd localprint \"message\"\n");
+ LOG_INFO("Usage:^3 cl_cmd localprint \"message\"\n");
LOG_INFO(" 'message' is the centerprint message to send to yourself.\n");
return;
}
}
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 cl_cmd mv_download mapid\n");
+ LOG_INFO("Usage:^3 cl_cmd mv_download mapid\n");
LOG_INFO(" Where 'mapid' is the id number of the map to request an image of on the map vote selection menu.\n");
return;
}
}
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 cl_cmd sendcvar <cvar>\n");
+ LOG_INFO("Usage:^3 cl_cmd sendcvar <cvar>\n");
LOG_INFO(" Where 'cvar' is the cvar plus arguments to send to the server.\n");
return;
}
{
if (argc == 1)
{
- LOG_INFO("\nClient console commands:\n");
+ LOG_INFO("Client console commands:\n");
LocalCommand_macro_help();
LOG_INFO("\nGeneric commands shared by all programs:\n");
LOG_INFO("Incorrect parameters for ^2addtolist^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " addtolist variable value\n"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " addtolist variable value\n");
LOG_INFO(" Where 'variable' is what to add 'value' to.\n");
LOG_INFO("See also: ^2removefromlist^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " qc_curl [--key N] [--cvar] [--exec] URL [postargs...]"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " qc_curl [--key N] [--cvar] [--exec] URL [postargs...]");
return;
}
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpcommands"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " dumpcommands");
LOG_INFO(" No arguments required.\n");
return;
}
LOG_INFO("Incorrect parameters for ^2maplist^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " maplist action [map]\n"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " maplist action [map]\n");
LOG_INFO(" Where 'action' is the command to complete,\n");
LOG_INFO(" and 'map' is what it acts upon (if required).\n");
LOG_INFO(" Full list of commands here: \"add, cleanup, remove, shuffle.\"\n");
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " nextframe command...\n"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " nextframe command...\n");
LOG_INFO(" Where command will be executed next frame of this VM\n");
return;
}
LOG_INFO("Incorrect parameters for ^2removefromlist^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " removefromlist variable value\n"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " removefromlist variable value\n");
LOG_INFO(" Where 'variable' is what cvar to remove 'value' from.\n");
LOG_INFO("See also: ^2addtolist^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " restartnotifs"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " restartnotifs");
LOG_INFO(" No arguments required.\n");
return;
}
LOG_INFO("Incorrect parameters for ^2settemp^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp \"cvar\" \"arguments\"\n"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " settemp \"cvar\" \"arguments\"\n");
LOG_INFO(" Where 'cvar' is the cvar you want to temporarily set with 'arguments'.\n");
LOG_INFO("See also: ^2settemp_restore^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp_restore\n"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " settemp_restore\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2settemp^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " [function to run]"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " [function to run]");
return;
}
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " rpn EXPRESSION...\n"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " rpn EXPRESSION...\n");
LOG_INFO(" Operator description (x: string, s: set, f: float):\n");
LOG_INFO(" x pop -----------------------------> : removes the top\n");
LOG_INFO(" x dup -----------------------------> x x : duplicates the top\n");
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " debugdraw_sv"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " debugdraw_sv");
return;
}
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " bufstr_get bufhandle string_index"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " bufstr_get bufhandle string_index");
return;
}
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " version"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " version");
return;
}
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " cvar_localchanges"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " cvar_localchanges");
return;
}
}
}
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 " GetProgramCommandPrefix() " find classname\n");
+ LOG_INFO("Usage:^3 " GetProgramCommandPrefix() " find classname\n");
LOG_INFO(" Where 'classname' is the classname to search for.\n");
return;
}
LOG_INFO("Incorrect parameters for ^2findat^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 " GetProgramCommandPrefix() " findat \"0 0 0\"\n");
+ LOG_INFO("Usage:^3 " GetProgramCommandPrefix() " findat \"0 0 0\"\n");
return;
}
}
}
default:
case CMD_REQUEST_USAGE: {
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpeffectinfo [filename]"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " dumpeffectinfo [filename]");
LOG_INFO(" Where 'filename' is the file to write (default is effectinfo_dump.txt),\n");
LOG_INFO(" if supplied with '-' output to console as well as default,\n");
LOG_INFO(" if left blank, it will only write to default.\n");
tracebox(this.origin, BALL_MINS, BALL_MAXS, this.origin, true, this);
if(trace_startsolid)
{
- vector o;
- o = this.origin;
- if(!move_out_of_solid(this))
+ vector o = this.origin;
+ if (!move_out_of_solid(this)) {
objerror(this, "could not get out of solid at all!");
- LOG_INFO("^1NOTE: this map needs FIXING. ", this.classname, " at ", vtos(o - '0 0 1'));
- LOG_INFO(" needs to be moved out of solid, e.g. by '", ftos(this.origin.x - o.x));
- LOG_INFO(" ", ftos(this.origin.y - o.y));
- LOG_INFO(" ", ftos(this.origin.z - o.z), "'\n");
+ }
+ LOG_INFOF(
+ "^1NOTE: this map needs FIXING. %s at %s needs to be moved out of solid, e.g. by %s",
+ this.classname,
+ vtos(o - '0 0 1'),
+ vtos(this.origin - o)
+ );
this.origin = o;
}
}
}
default:
case CMD_REQUEST_USAGE: {
- LOG_INFOF("\nUsage:^3 %s dumpitems", GetProgramCommandPrefix());
+ LOG_INFOF("Usage:^3 %s dumpitems", GetProgramCommandPrefix());
return;
}
}
if(file_get < 0)
{
if(autocvar_g_sandbox_info > 0)
- LOG_INFO(strcat("^3SANDBOX - SERVER: ^7could not find storage file ^3", file_name, "^7, no objects were loaded\n"));
+ LOG_INFO("^3SANDBOX - SERVER: ^7could not find storage file ^3", file_name, "^7, no objects were loaded\n");
}
else
{
}
}
if(autocvar_g_sandbox_info > 0)
- LOG_INFO(strcat("^3SANDBOX - SERVER: ^7successfully loaded storage file ^3", file_name, "\n"));
+ LOG_INFO("^3SANDBOX - SERVER: ^7successfully loaded storage file ^3", file_name, "\n");
}
fclose(file_get);
}
_setmodel(e, argv(2));
if(autocvar_g_sandbox_info > 0)
- LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " spawned an object at origin ^3", vtos(e.origin), "\n"));
+ LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " spawned an object at origin ^3", vtos(e.origin), "\n");
return true;
// ---------------- COMMAND: OBJECT, REMOVE ----------------
if(e != NULL)
{
if(autocvar_g_sandbox_info > 0)
- LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " removed an object at origin ^3", vtos(e.origin), "\n"));
+ LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " removed an object at origin ^3", vtos(e.origin), "\n");
sandbox_ObjectRemove(e);
return true;
}
print_to(player, "^2SANDBOX - INFO: ^7Object pasted successfully");
if(autocvar_g_sandbox_info > 0)
- LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " pasted an object at origin ^3", vtos(e.origin), "\n"));
+ LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " pasted an object at origin ^3", vtos(e.origin), "\n");
return true;
}
return true;
player.object_attach = NULL; // object was attached, no longer keep it scheduled for attachment
print_to(player, "^2SANDBOX - INFO: ^7Object attached successfully");
if(autocvar_g_sandbox_info > 1)
- LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " attached objects at origin ^3", vtos(e.origin), "\n"));
+ LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " attached objects at origin ^3", vtos(e.origin), "\n");
return true;
}
print_to(player, "^1SANDBOX - WARNING: ^7Object could not be attached to the parent. Make sure you are facing an object that you have edit rights over");
sandbox_ObjectAttach_Remove(e);
print_to(player, "^2SANDBOX - INFO: ^7Child objects detached successfully");
if(autocvar_g_sandbox_info > 1)
- LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " detached objects at origin ^3", vtos(e.origin), "\n"));
+ LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " detached objects at origin ^3", vtos(e.origin), "\n");
return true;
}
print_to(player, "^1SANDBOX - WARNING: ^7Child objects could not be detached. Make sure you are facing an object that you have edit rights over");
e.message2 = strzone(strftime(true, "%d-%m-%Y %H:%M:%S"));
if(autocvar_g_sandbox_info > 1)
- LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", player.netname, " edited property ^3", argv(2), " ^7of an object at origin ^3", vtos(e.origin), "\n"));
+ LOG_INFO("^3SANDBOX - SERVER: ^7", player.netname, " edited property ^3", argv(2), " ^7of an object at origin ^3", vtos(e.origin), "\n");
return true;
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]");
LOG_INFO(" Where 'filename' is the file to write (default is notifications_dump.cfg),\n");
LOG_INFO(" if supplied with '-' output to console as well as default,\n");
LOG_INFO(" if left blank, it will only write to default.\n");
float i = 0;
for(e = PS_D_IN_EVL; (en = db_get(PS_D_IN_DB, e)) != ""; e = en)
{
- LOG_INFO(sprintf("%d:%s:%s\n", i, e, db_get(PS_D_IN_DB, sprintf("#%s", e))));
+ LOG_INFOF("%d:%s:%s\n", i, e, db_get(PS_D_IN_DB, sprintf("#%s", e)));
++i;
}
#endif
}
#if 0
- LOG_INFO(sprintf(
+ LOG_INFOF(
"PlayerStats_PlayerDetail_Handler(): "
"Key '%s', Event '%s', Data '%s'\n",
key,
event,
data
- ));
+ );
#endif
}
//print("PlayerStats_PlayerDetail_Handler(): End of response.\n");
if(tur_config_file >= 0)
{
Dump_Turret_Settings();
- LOG_INFO(sprintf("Dumping turrets... File located in ^2data/data/%s^7.\n", filename));
+ LOG_INFOF("Dumping turrets... File located in ^2data/data/%s^7.\n", filename);
fclose(tur_config_file);
tur_config_file = -1;
tur_config_alsoprint = -1;
}
else
{
- LOG_INFO(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
+ LOG_INFOF("^1Error: ^7Could not open file '%s'!\n", filename);
}
#else
LOG_INFO(_("Turrets dump command only works with sv_cmd.\n"));
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpturrets [filename]"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " dumpturrets [filename]");
LOG_INFO(" Where 'filename' is the file to write (default is turrets_dump.cfg),\n");
LOG_INFO(" if supplied with '-' output to console as well as default,\n");
LOG_INFO(" if left blank, it will only write to default.\n");
TUR_CONFIG_WRITETOFILE("// }}}\n")
// step 5: debug info
- LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, it.turret_name, TUR_CONFIG_COUNT));
+ LOG_INFOF("#%d: %s: %d settings...\n", i, it.turret_name, TUR_CONFIG_COUNT);
totalsettings += TUR_CONFIG_COUNT;
});
config_queue[j] = string_null;
// extra information
- LOG_INFO(sprintf("Totals: %d turrets, %d settings\n", (Turrets_COUNT - 1), totalsettings));
+ LOG_INFOF("Totals: %d turrets, %d settings\n", (Turrets_COUNT - 1), totalsettings);
}
#endif
if(cvar("developer"))
{
- LOG_INFO("Verifying vector compression table...\n");
+ LOG_INFO("Verifying vector compression table...");
for(i = 0x0F00; i < 0xFFFF; ++i)
if(i != compressShortVector(decompressShortVector(i)))
{
- LOG_INFO("BROKEN vector compression: ", ftos(i));
- LOG_INFO(" -> ", vtos(decompressShortVector(i)));
- LOG_INFO(" -> ", ftos(compressShortVector(decompressShortVector(i))));
- LOG_INFO("\n");
+ LOG_INFOF(
+ "BROKEN vector compression: %s -> %s -> %s",
+ ftos(i),
+ vtos(decompressShortVector(i)),
+ ftos(compressShortVector(decompressShortVector(i)))
+ );
error("b0rk");
}
- LOG_INFO("Done.\n");
+ LOG_INFO("Done.");
}
}
}
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 cl_cmd weapon_find weapon\n");
+ LOG_INFO("Usage:^3 cl_cmd weapon_find weapon\n");
LOG_INFO(" Where 'weapon' is the lowercase weapon name, 'all' or 'unowned'.\n");
return;
}
if(wep_config_file >= 0)
{
Dump_Weapon_Settings();
- LOG_INFO(sprintf("Dumping weapons... File located in ^2data/data/%s^7.\n", filename));
+ LOG_INFOF("Dumping weapons... File located in ^2data/data/%s^7.\n", filename);
fclose(wep_config_file);
wep_config_file = -1;
wep_config_alsoprint = -1;
}
else
{
- LOG_INFO(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
+ LOG_INFOF("^1Error: ^7Could not open file '%s'!\n", filename);
}
#else
LOG_INFO(_("Weapons dump command only works with sv_cmd.\n"));
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]"));
+ LOG_INFO("Usage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]");
LOG_INFO(" Where 'filename' is the file to write (default is weapons_dump.cfg),\n");
LOG_INFO(" if supplied with '-' output to console as well as default,\n");
LOG_INFO(" if left blank, it will only write to default.\n");
WEP_CONFIG_WRITETOFILE("// }}}\n");
// step 5: debug info
- LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, it.m_name, WEP_CONFIG_COUNT));
+ LOG_INFOF("#%d: %s: %d settings...\n", i, it.m_name, WEP_CONFIG_COUNT);
totalweapons += 1;
totalsettings += WEP_CONFIG_COUNT;
});
config_queue[x] = string_null;
// extra information
- LOG_INFO(sprintf("Totals: %d weapons, %d settings\n", totalweapons, totalsettings));
+ LOG_INFOF("Totals: %d weapons, %d settings\n", totalweapons, totalsettings);
}
{ accuracy_add(this.realowner, WEP_SHOCKWAVE.m_id, 0, swing_damage); }
#ifdef DEBUG_SHOCKWAVE
- LOG_INFO(sprintf(
+ LOG_INFOF(
"MELEE: %s hitting %s with %f damage (factor: %f) at %f time.\n",
this.realowner.netname,
target_victim.netname,
swing_damage,
swing_factor,
time
- ));
+ );
#endif
// allow multiple hits with one swing, but not against the same player twice
);
#ifdef DEBUG_SHOCKWAVE
- LOG_INFO(sprintf(
+ LOG_INFOF(
"SELF HIT: multiplier = %f, damage = %f, force = %f... "
"multiplier_from_accuracy = %f, multiplier_from_distance = %f.\n",
multiplier,
vlen(final_force),
multiplier_from_accuracy,
multiplier_from_distance
- ));
+ );
#endif
}
else if(distance_to_head <= WEP_CVAR(shockwave, blast_splash_radius))
if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { queue = min(queue + 1, MAX_SHOCKWAVE_HITS); }
#ifdef DEBUG_SHOCKWAVE
- LOG_INFO(sprintf(
+ LOG_INFOF(
"SPLASH HIT: multiplier = %f, damage = %f, force = %f... "
"multiplier_from_accuracy = %f, multiplier_from_distance = %f.\n",
multiplier,
vlen(final_force),
multiplier_from_accuracy,
multiplier_from_distance
- ));
+ );
#endif
}
}
if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { queue = min(queue + 1, MAX_SHOCKWAVE_HITS); }
#ifdef DEBUG_SHOCKWAVE
- LOG_INFO(sprintf(
+ LOG_INFOF(
"BLAST HIT: multiplier = %f, damage = %f, force = %f... "
"multiplier_from_accuracy = %f, multiplier_from_distance = %f.\n",
multiplier,
vlen(final_force),
multiplier_from_accuracy,
multiplier_from_distance
- ));
+ );
#endif
}
}
accuracy_add(actor, WEP_SHOCKWAVE.m_id, 0, final_damage);
#ifdef DEBUG_SHOCKWAVE
- LOG_INFO(sprintf(
+ LOG_INFOF(
"SHOCKWAVE by %s: damage = %f, force = %f.\n",
actor.netname,
final_damage,
vlen(final_force)
- ));
+ );
#endif
shockwave_hit[i-1] = NULL;
#define _LOG_INFO(s) \
MACRO_BEGIN { \
dprint(_LOG_HEADER("^5INFO")); \
- print("\n^7", s); \
+ string __s = s; \
+ print("\n^7", __s); \
+ /* TODO: unconditionally add a newline when possible */ \
+ if (str2chr(__s, strlen(__s) - 1) != '\n') { print("\n"); } \
} MACRO_END
#define LOG_TRACE(...) _LOG_TRACE(strcat1n(__VA_ARGS__))
s = me.toString(me);
if (s == "") s = me.classname;
else s = strcat(me.classname, ": ", s);
- LOG_INFO(_dumptree_space, etos(me), " (", s, ")");
+ print(_dumptree_space, etos(me), " (", s, ")");
if (me.firstChild)
{
- LOG_INFO(" {\n");
+ print(" {\n");
_dumptree_space = strcat(_dumptree_space, " ");
}
else
{
- LOG_INFO("\n");
+ print("\n");
}
}
void _dumptree_close(entity pass, entity me)
if (me.firstChild)
{
_dumptree_space = substring(_dumptree_space, 0, strlen(_dumptree_space) - 2);
- LOG_INFO(_dumptree_space, "}\n");
+ print(_dumptree_space, "}\n");
}
}
LOG_INFO(_(" sync - reloads all cvars on the current menu page\n"));
LOG_INFO(_(" directmenu ITEM - select a menu item as main item\n"));
- LOG_INFO("\nGeneric commands shared by all programs:\n");
+ LOG_INFO("Generic commands shared by all programs:\n");
GenericCommand_macro_help();
return;
if(file < 0)
{
- LOG_INFO(strcat("Error: Can not open the bot configuration file '",autocvar_bot_config_file,"'\n"));
+ LOG_INFOF("Error: Can not open the bot configuration file '%s'", autocvar_bot_config_file);
readfile = "";
}
else
break;
}
- LOG_INFO(strcat("Command: ",bot_cmd_string[i],"\nParameter: <",stype,"> \n"));
-
- LOG_INFO("Description: ");
+ string prelude = strcat(
+ "Command: ", bot_cmd_string[i], "\n",
+ "Parameter: <", stype, ">", "\n",
+ "Description: "
+ );
switch(i)
{
case BOT_CMD_PAUSE:
- LOG_INFO("Stops the bot completely. Any command other than 'continue' will be ignored.");
+ LOG_INFO(prelude, "Stops the bot completely. Any command other than 'continue' will be ignored.");
break;
case BOT_CMD_CONTINUE:
- LOG_INFO("Disable paused status");
+ LOG_INFO(prelude, "Disable paused status");
break;
case BOT_CMD_WAIT:
- LOG_INFO("Pause command parsing and bot ai for N seconds. Pressed key will remain pressed");
+ LOG_INFO(prelude, "Pause command parsing and bot ai for N seconds. Pressed key will remain pressed");
break;
case BOT_CMD_WAIT_UNTIL:
- LOG_INFO("Pause command parsing and bot ai until time is N from the last barrier. Pressed key will remain pressed");
+ LOG_INFO(prelude, "Pause command parsing and bot ai until time is N from the last barrier. Pressed key will remain pressed");
break;
case BOT_CMD_BARRIER:
- LOG_INFO("Waits till all bots that have a command queue reach this command. Pressed key will remain pressed");
+ LOG_INFO(prelude, "Waits till all bots that have a command queue reach this command. Pressed key will remain pressed");
break;
case BOT_CMD_TURN:
- LOG_INFO("Look to the right or left N degrees. For turning to the left use positive numbers.");
+ LOG_INFO(prelude, "Look to the right or left N degrees. For turning to the left use positive numbers.");
break;
case BOT_CMD_MOVETO:
- LOG_INFO("Walk to an specific coordinate on the map. Usage: moveto \'x y z\'");
+ LOG_INFO(prelude, "Walk to an specific coordinate on the map. Usage: moveto \'x y z\'");
break;
case BOT_CMD_MOVETOTARGET:
- LOG_INFO("Walk to the specific target on the map");
+ LOG_INFO(prelude, "Walk to the specific target on the map");
break;
case BOT_CMD_RESETGOAL:
- LOG_INFO("Resets the goal stack");
+ LOG_INFO(prelude, "Resets the goal stack");
break;
case BOT_CMD_CC:
- LOG_INFO("Execute client command. Examples: cc \"say something\"; cc god; cc \"name newnickname\"; cc kill;");
+ LOG_INFO(prelude, "Execute client command. Examples: cc \"say something\"; cc god; cc \"name newnickname\"; cc kill;");
break;
case BOT_CMD_IF:
- LOG_INFO("Perform simple conditional execution.\n");
- LOG_INFO("Syntax: \n");
- LOG_INFO(" sv_cmd .. if \"condition\"\n");
- LOG_INFO(" sv_cmd .. <instruction if true>\n");
- LOG_INFO(" sv_cmd .. <instruction if true>\n");
- LOG_INFO(" sv_cmd .. else\n");
- LOG_INFO(" sv_cmd .. <instruction if false>\n");
- LOG_INFO(" sv_cmd .. <instruction if false>\n");
- LOG_INFO(" sv_cmd .. fi\n");
- LOG_INFO("Conditions: a=b, a>b, a<b, a\t\t(spaces not allowed)\n");
- LOG_INFO(" Values in conditions can be numbers, cvars in the form cvar.cvar_string or special fields\n");
- LOG_INFO("Fields: health, speed, flagcarrier\n");
- LOG_INFO("Examples: if health>50; if health>cvar.g_balance_laser_primary_damage; if flagcarrier;");
+ LOG_INFO(prelude, "Perform simple conditional execution.\n"
+ "Syntax: \n"
+ " sv_cmd .. if \"condition\"\n"
+ " sv_cmd .. <instruction if true>\n"
+ " sv_cmd .. <instruction if true>\n"
+ " sv_cmd .. else\n"
+ " sv_cmd .. <instruction if false>\n"
+ " sv_cmd .. <instruction if false>\n"
+ " sv_cmd .. fi\n"
+ "Conditions: a=b, a>b, a<b, a\t\t(spaces not allowed)\n"
+ " Values in conditions can be numbers, cvars in the form cvar.cvar_string or special fields\n"
+ "Fields: health, speed, flagcarrier\n"
+ "Examples: if health>50; if health>cvar.g_balance_laser_primary_damage; if flagcarrier;"
+ );
break;
case BOT_CMD_RESETAIM:
- LOG_INFO("Points the aim to the coordinates x,y 0,0");
+ LOG_INFO(prelude, "Points the aim to the coordinates x,y 0,0");
break;
case BOT_CMD_AIM:
- LOG_INFO("Move the aim x/y (horizontal/vertical) degrees relatives to the bot\n");
- LOG_INFO("There is a 3rd optional parameter telling in how many seconds the aim has to reach the new position\n");
- LOG_INFO("Examples: aim \"90 0\" // Turn 90 degrees inmediately (positive numbers move to the left/up)\n");
- LOG_INFO(" aim \"0 90 2\" // Will gradually look to the sky in the next two seconds");
+ LOG_INFO(prelude, "Move the aim x/y (horizontal/vertical) degrees relatives to the bot\n"
+ "There is a 3rd optional parameter telling in how many seconds the aim has to reach the new position\n"
+ "Examples: aim \"90 0\" // Turn 90 degrees inmediately (positive numbers move to the left/up)\n"
+ " aim \"0 90 2\" // Will gradually look to the sky in the next two seconds"
+ );
break;
case BOT_CMD_AIMTARGET:
- LOG_INFO("Points the aim to given target");
+ LOG_INFO(prelude, "Points the aim to given target");
break;
case BOT_CMD_PRESSKEY:
- LOG_INFO("Press one of the following keys: forward, backward, left, right, jump, crouch, attack1, attack2, use\n");
+ LOG_INFO(prelude, "Press one of the following keys: forward, backward, left, right, jump, crouch, attack1, attack2, use\n");
LOG_INFO("Multiple keys can be pressed at time (with many presskey calls) and it will remain pressed until the command \"releasekey\" is called");
LOG_INFO("Note: The script will not return the control to the bot ai until all keys are released");
break;
case BOT_CMD_RELEASEKEY:
- LOG_INFO("Release previoulsy used keys. Use the parameter \"all\" to release all keys");
+ LOG_INFO(prelude, "Release previoulsy used keys. Use the parameter \"all\" to release all keys");
break;
case BOT_CMD_SOUND:
- LOG_INFO("play sound file at bot location");
+ LOG_INFO(prelude, "play sound file at bot location");
break;
case BOT_CMD_DEBUG_ASSERT_CANFIRE:
- LOG_INFO("verify the state of the weapon entity");
+ LOG_INFO(prelude, "verify the state of the weapon entity");
break;
default:
- LOG_INFO("This command has no description yet.");
+ LOG_INFO(prelude, "This command has no description yet.");
break;
}
- LOG_INFO("\n");
}
}
if(!bot_cmds_initialized)
bot_commands_init();
- LOG_INFO("List of all available commands:\n");
- LOG_INFO(" Command - Parameter Type\n");
+ LOG_INFO(
+ "List of all available commands:\n"
+ " Command - Parameter Type\n"
+ );
for(i=1;i<BOT_CMD_COUNTER;++i)
{
ptype = "none";
break;
}
- LOG_INFO(strcat(" ",bot_cmd_string[i]," - <",ptype,"> \n"));
+ LOG_INFO(" ", bot_cmd_string[i]," - <", ptype, ">");
}
}
return ((this.flagcarried!=NULL));
}
- LOG_INFO(strcat("ERROR: Unable to convert the expression '",expr,"' into a numeric value\n"));
+ LOG_INFO("ERROR: Unable to convert the expression '", expr, "' into a numeric value");
return 0;
}
if(bot_cmd.bot_cmd_type!=BOT_CMD_NULL)
{
bot_command_executed(this, true);
- LOG_INFO( "WARNING: Commands are ignored while the bot is paused. Use the command 'continue' instead.\n");
+ LOG_INFO("WARNING: Commands are ignored while the bot is paused. Use the command 'continue' instead.\n");
}
return 1;
}
status = bot_cmd_debug_assert_canfire(this);
break;
default:
- LOG_INFO(strcat("ERROR: Invalid command on queue with id '",ftos(bot_cmd.bot_cmd_type),"'\n"));
+ LOG_INFOF("ERROR: Invalid command on queue with id '%s'", ftos(bot_cmd.bot_cmd_type));
return 0;
}
if (status==CMD_STATUS_ERROR)
- LOG_INFO(strcat("ERROR: The command '",bot_cmd_string[bot_cmd.bot_cmd_type],"' returned an error status\n"));
+ LOG_INFOF("ERROR: The command '%s' returned an error status", bot_cmd_string[bot_cmd.bot_cmd_type]);
// Move execution pointer
if(status==CMD_STATUS_EXECUTING)
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;
}
LOG_INFO("Incorrect parameters for ^2ban^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd ban address [bantime] [reason]\n");
+ LOG_INFO("Usage:^3 sv_cmd ban address [bantime] [reason]\n");
LOG_INFO(" 'address' is the IP address or range of the player to ban,\n");
LOG_INFO(" 'bantime' is the amount of time that the ban is active (default if not provided),\n");
LOG_INFO(" and 'reason' is the string to label the ban with as reason for banning.\n");
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd banlist\n");
+ LOG_INFO("Usage:^3 sv_cmd banlist\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2ban, kickban, unban^7\n");
return;
LOG_INFO("Incorrect parameters for ^2kickban^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd kickban client [bantime] [masksize] [reason]\n");
+ LOG_INFO("Usage:^3 sv_cmd kickban client [bantime] [masksize] [reason]\n");
LOG_INFO(" 'client' is the entity number or name of the player to ban,\n");
LOG_INFO(" 'bantime' is the amount of time that the ban is active (default if not provided),\n");
LOG_INFO(" 'masksize' is the range of the IP address (1-thru-4, default if not provided),\n");
LOG_INFO("Incorrect parameters for ^2mute^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd mute client\n");
+ LOG_INFO("Usage:^3 sv_cmd mute client\n");
LOG_INFO(" 'client' is the entity number or name of the player to mute.\n");
LOG_INFO("See also: ^2unmute^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd unban banid\n");
+ LOG_INFO("Usage:^3 sv_cmd unban banid\n");
LOG_INFO(" Where 'banid' is the ID of the ban of which to remove.\n");
LOG_INFO("See also: ^2ban, banlist, kickban^7\n");
return;
LOG_INFO("Incorrect parameters for ^2mute^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd unmute client\n");
+ LOG_INFO("Usage:^3 sv_cmd unmute client\n");
LOG_INFO(" 'client' is the entity number or name of the player to unmute.\n");
LOG_INFO("See also: ^2mute^7\n");
return;
void print_to(entity to, string input)
{
if (to) sprint(to, strcat(input, "\n"));
- else LOG_INFO(input, "\n");
+ else print(input, "\n");
}
// ==========================================
case "butcher":
{
if (caller) { print_to(caller, "This command is not available to players"); return; }
- if (MUTATOR_CALLHOOK(AllowMobButcher)) { LOG_INFO(M_ARGV(0, string), "\n"); return; }
+ if (MUTATOR_CALLHOOK(AllowMobButcher)) { LOG_INFOF("%s", M_ARGV(0, string)); return; }
int tmp_remcount = 0;
LOG_INFO("Incorrect parameters for ^2adminmsg^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd adminmsg clients \"message\" [infobartime]\n");
+ LOG_INFO("Usage:^3 sv_cmd adminmsg clients \"message\" [infobartime]\n");
LOG_INFO(" 'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
LOG_INFO(" If infobartime is provided, the message will be sent to infobar.\n");
LOG_INFO(" Otherwise, it will just be sent as a centerprint message.\n");
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd allready\n");
+ LOG_INFO("Usage:^3 sv_cmd allready\n");
LOG_INFO(" No arguments required.\n");
return;
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd allspec [reason]\n");
+ LOG_INFO("Usage:^3 sv_cmd allspec [reason]\n");
LOG_INFO(" Where 'reason' is an optional argument for explanation of allspec command.\n");
LOG_INFO("See also: ^2moveplayer, shuffleteams^7\n");
return;
LOG_INFO("Incorrect parameters for ^2anticheat^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd anticheat client\n");
+ LOG_INFO("Usage:^3 sv_cmd anticheat client\n");
LOG_INFO(" 'client' is the entity number or name of the player.\n");
return;
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd bbox\n");
+ LOG_INFO("Usage:^3 sv_cmd bbox\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2gettaginfo, trace^7\n");
return;
bot_num++;
});
if(bot_num)
- LOG_INFO(strcat("Command '", substring(command, argv_start_index(2), -1), "' sent to all bots (", ftos(bot_num), ")\n"));
+ LOG_INFO("Command '", substring(command, argv_start_index(2), -1), "' sent to all bots (", ftos(bot_num), ")\n");
return;
}
else
if (bot == NULL) bot = find_bot_by_name(argv(1));
if (bot)
{
- LOG_INFO(strcat("Command '", substring(command, argv_start_index(2), -1), "' sent to bot ", bot.netname, "\n"));
+ LOG_INFO("Command '", substring(command, argv_start_index(2), -1), "' sent to bot ", bot.netname, "\n");
bot_queuecommand(bot, substring(command, argv_start_index(2), -1));
return;
}
else
{
- LOG_INFO(strcat("Error: Can't find bot with the name or id '", argv(1), "' - Did you mistype the command?\n")); // don't return so that usage is shown
+ LOG_INFO("Error: Can't find bot with the name or id '", argv(1), "' - Did you mistype the command?\n"); // don't return so that usage is shown
}
}
}
LOG_INFO("Incorrect parameters for ^2bot_cmd^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd bot_cmd client command [argument]\n");
+ LOG_INFO("Usage:^3 sv_cmd bot_cmd client command [argument]\n");
LOG_INFO(" 'client' can be either the name of the bot or a progressive number (not the entity number!)\n");
LOG_INFO(" can also be '*' or 'all' to allow sending the command to all the bots\n");
LOG_INFO(" For full list of commands, see bot_cmd help [command].\n");
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd cointoss [result1 result2]\n");
+ LOG_INFO("Usage:^3 sv_cmd cointoss [result1 result2]\n");
LOG_INFO(" Where 'result1' and 'result2' are user created options.\n");
return;
}
if (argv(1) == "save")
{
db_save(ServerProgsDB, argv(2));
- LOG_INFO(strcat("Copied serverprogs database to '", argv(2), "' in the data directory.\n"));
+ LOG_INFO("Copied serverprogs database to '", argv(2), "' in the data directory.\n");
return;
}
else if (argv(1) == "dump")
{
db_close(ServerProgsDB);
ServerProgsDB = db_load(argv(2));
- LOG_INFO(strcat("Loaded '", argv(2), "' as new serverprogs database.\n"));
+ LOG_INFO("Loaded '", argv(2), "' as new serverprogs database.\n");
return;
}
}
LOG_INFO("Incorrect parameters for ^2database^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd database action filename\n");
+ LOG_INFO("Usage:^3 sv_cmd database action filename\n");
LOG_INFO(" Where 'action' is the command to complete,\n");
LOG_INFO(" and 'filename' is what it acts upon.\n");
LOG_INFO(" Full list of commands here: \"save, dump, load.\"\n");
LOG_INFO("Incorrect parameters for ^2defer_clear^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd defer_clear client\n");
+ LOG_INFO("Usage:^3 sv_cmd defer_clear client\n");
LOG_INFO(" 'client' is the entity number or name of the player.\n");
LOG_INFO("See also: ^2defer_clear_all^7\n");
return;
GameCommand_defer_clear(CMD_REQUEST_COMMAND, argc);
++n;
});
- if (n) LOG_INFO(strcat("Successfully stuffed defer clear to all clients (", ftos(n), ")\n")); // should a message be added if no players were found?
+ if (n) LOG_INFO("Successfully stuffed defer clear to all clients (", ftos(n), ")\n"); // should a message be added if no players were found?
return;
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd defer_clear_all\n");
+ LOG_INFO("Usage:^3 sv_cmd defer_clear_all\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2defer_clear^7\n");
return;
LOG_INFO("Incorrect parameters for ^2delrec^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd delrec ranking [map]\n");
+ LOG_INFO("Usage:^3 sv_cmd delrec ranking [map]\n");
LOG_INFO(" 'ranking' is which ranking level to clear up to, \n");
LOG_INFO(" it will clear all records up to nth place.\n");
LOG_INFO(" if 'map' is not provided it will use current map.\n");
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd effectindexdump\n");
+ LOG_INFO("Usage:^3 sv_cmd effectindexdump\n");
LOG_INFO(" No arguments required.\n");
return;
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd extendmatchtime\n");
+ LOG_INFO("Usage:^3 sv_cmd extendmatchtime\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2reducematchtime^7\n");
return;
LOG_INFO("Incorrect parameters for ^2gametype^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd gametype mode\n");
+ LOG_INFO("Usage:^3 sv_cmd gametype mode\n");
LOG_INFO(" Where 'mode' is the gametype mode to switch to.\n");
LOG_INFO("See also: ^2gotomap^7\n");
return;
if (i)
{
v = gettaginfo(tmp_entity, i);
- LOG_INFO("model ", tmp_entity.model, " frame ", ftos(tmp_entity.frame), " tag ", gettaginfo_name);
- LOG_INFO(" index ", ftos(i), " parent ", ftos(gettaginfo_parent), "\n");
- LOG_INFO(" vector = ", ftos(v.x), " ", ftos(v.y), " ", ftos(v.z), "\n");
- LOG_INFO(" offset = ", ftos(gettaginfo_offset.x), " ", ftos(gettaginfo_offset.y), " ", ftos(gettaginfo_offset.z), "\n");
- LOG_INFO(" forward = ", ftos(gettaginfo_forward.x), " ", ftos(gettaginfo_forward.y), " ", ftos(gettaginfo_forward.z), "\n");
- LOG_INFO(" right = ", ftos(gettaginfo_right.x), " ", ftos(gettaginfo_right.y), " ", ftos(gettaginfo_right.z), "\n");
- LOG_INFO(" up = ", ftos(gettaginfo_up.x), " ", ftos(gettaginfo_up.y), " ", ftos(gettaginfo_up.z), "\n");
+ 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)
+ );
+ 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));
+ LOG_INFOF(" forward = %s %s %s", ftos(gettaginfo_forward.x), ftos(gettaginfo_forward.y), ftos(gettaginfo_forward.z));
+ LOG_INFOF(" right = %s %s %s", ftos(gettaginfo_right.x), ftos(gettaginfo_right.y), ftos(gettaginfo_right.z));
+ LOG_INFOF(" up = %s %s %s", ftos(gettaginfo_up.x), ftos(gettaginfo_up.y), ftos(gettaginfo_up.z));
if (argc >= 6)
{
v.y = -v.y;
LOG_INFO("Incorrect parameters for ^2gettaginfo^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
+ LOG_INFO("Usage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
LOG_INFO("See also: ^2bbox, trace^7\n");
return;
}
LOG_INFO("Incorrect parameters for ^2gettaginfo^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
+ LOG_INFO("Usage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
LOG_INFO("See also: ^2bbox, trace^7\n");
return;
}
LOG_INFO("Incorrect parameters for ^2gotomap^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd gotomap map\n");
+ LOG_INFO("Usage:^3 sv_cmd gotomap map\n");
LOG_INFO(" Where 'map' is the *.bsp file to change to.\n");
LOG_INFO("See also: ^2gametype^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd lockteams\n");
+ LOG_INFO("Usage:^3 sv_cmd lockteams\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2unlockteams^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd make_mapinfo\n");
+ LOG_INFO("Usage:^3 sv_cmd make_mapinfo\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2radarmap^7\n");
return;
LOG_INFO("Incorrect parameters for ^2moveplayer^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd moveplayer clients destination\n");
+ LOG_INFO("Usage:^3 sv_cmd moveplayer clients destination\n");
LOG_INFO(" 'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
LOG_INFO(" 'destination' is what to send the player to, be it team or spectating\n");
LOG_INFO(" Full list of destinations here: \"spec, spectator, red, blue, yellow, pink, auto.\"\n");
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd nospectators\n");
+ LOG_INFO("Usage:^3 sv_cmd nospectators\n");
LOG_INFO(" No arguments required.\n");
return;
}
LOG_INFO("Incorrect parameters for ^2playerdemo^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd playerdemo command (entitynumber filename | entitynumber botnumber)\n");
+ LOG_INFO("Usage:^3 sv_cmd playerdemo command (entitynumber filename | entitynumber botnumber)\n");
LOG_INFO(" Full list of commands here: \"read, write, auto_read_and_write, auto_read.\"\n");
return;
}
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd printstats\n");
+ LOG_INFO("Usage:^3 sv_cmd printstats\n");
LOG_INFO(" No arguments required.\n");
return;
}
LOG_INFO("Incorrect parameters for ^2radarmap^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd radarmap [--force] [--loop] [--quit] [--block | --trace | --sample | --lineblock] [--sharpen N] [--res W H] [--qual Q]\n");
+ LOG_INFO("Usage:^3 sv_cmd radarmap [--force] [--loop] [--quit] [--block | --trace | --sample | --lineblock] [--sharpen N] [--res W H] [--qual Q]\n");
LOG_INFO(" The quality factor Q is roughly proportional to the time taken.\n");
LOG_INFO(" trace supports no quality factor; its result should look like --block with infinite quality factor.\n");
LOG_INFO("See also: ^2make_mapinfo^7\n");
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd reducematchtime\n");
+ LOG_INFO("Usage:^3 sv_cmd reducematchtime\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2extendmatchtime^7\n");
return;
LOG_INFO("Incorrect parameters for ^2setbots^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd setbots botnumber\n");
+ LOG_INFO("Usage:^3 sv_cmd setbots botnumber\n");
LOG_INFO(" Where 'botnumber' is the amount of bots to set bot_number cvar to.\n");
LOG_INFO("See also: ^2bot_cmd^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd shuffleteams\n");
+ LOG_INFO("Usage:^3 sv_cmd shuffleteams\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2moveplayer, allspec^7\n");
return;
if (accepted > 0)
{
stuffcmd(client, strcat("\n", argv(next_token), "\n"));
- LOG_INFO(strcat("Command: \"", argv(next_token), "\" sent to ", GetCallerName(client), " (", argv(1), ").\n"));
+ LOG_INFO("Command: \"", argv(next_token), "\" sent to ", GetCallerName(client), " (", argv(1), ").");
}
else
{
LOG_INFO("Incorrect parameters for ^2stuffto^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd stuffto client \"command\"\n");
+ LOG_INFO("Usage:^3 sv_cmd stuffto client \"command\"\n");
LOG_INFO(" 'client' is the entity number or name of the player,\n");
LOG_INFO(" and 'command' is the command to be sent to that player.\n");
return;
LOG_INFO("Incorrect parameters for ^2trace^7\n");
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd trace command (startpos endpos)\n");
+ LOG_INFO("Usage:^3 sv_cmd trace command (startpos endpos)\n");
LOG_INFO(" Full list of commands here: \"debug, debug2, walk, showline.\"\n");
LOG_INFO("See also: ^2bbox, gettaginfo^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd unlockteams\n");
+ LOG_INFO("Usage:^3 sv_cmd unlockteams\n");
LOG_INFO(" No arguments required.\n");
LOG_INFO("See also: ^2lockteams^7\n");
return;
default:
case CMD_REQUEST_USAGE:
{
- LOG_INFO("\nUsage:^3 sv_cmd warp [level]\n");
+ LOG_INFO("Usage:^3 sv_cmd warp [level]\n");
LOG_INFO(" 'level' is the level to change campaign mode to.\n");
LOG_INFO(" if 'level' is not provided it will change to the next level.\n");
return;
{
if (argc == 1)
{
- LOG_INFO("\nServer console commands:\n");
+ LOG_INFO("Server console commands:");
GameCommand_macro_help();
- LOG_INFO("\nBanning commands:\n");
+ LOG_INFO("\nBanning commands:");
BanCommand_macro_help();
- LOG_INFO("\nCommon networked commands:\n");
+ LOG_INFO("\nCommon networked commands:");
CommonCommand_macro_help(NULL);
- LOG_INFO("\nGeneric commands shared by all programs:\n");
+ LOG_INFO("\nGeneric commands shared by all programs:");
GenericCommand_macro_help();
- LOG_INFO("\nUsage:^3 sv_cmd COMMAND...^7, where possible commands are listed above.\n");
- LOG_INFO("For help about a specific command, type sv_cmd help COMMAND\n");
+ LOG_INFO(
+ "\nUsage:^3 sv_cmd COMMAND...^7, where possible commands are listed above.\n"
+ "For help about a specific command, type sv_cmd help COMMAND"
+ );
return;
}
tokenize_console(autocvar_g_ban_sync_uri);
uri = argv(id);
- LOG_INFO("Received ban list from ", uri, ": ");
+ string prelude = strcat("Received ban list from ", uri, ": ");
if(OnlineBanList_RequestWaiting[id] == 0)
{
- LOG_INFO("rejected (unexpected)\n");
+ LOG_INFO(prelude, "rejected (unexpected)\n");
return;
}
if(time > OnlineBanList_Timeout)
{
- LOG_INFO("rejected (too late)\n");
+ LOG_INFO(prelude, "rejected (too late)\n");
return;
}
syncinterval = autocvar_g_ban_sync_interval;
if(syncinterval == 0)
{
- LOG_INFO("rejected (syncing disabled)\n");
+ LOG_INFO(prelude, "rejected (syncing disabled)\n");
return;
}
if(syncinterval > 0)
if(status != 0)
{
- LOG_INFO("error: status is ", ftos(status), "\n");
+ LOG_INFO(prelude, "error: status is ", ftos(status), "\n");
return;
}
if(substring(data, 0, 1) == "<")
{
- LOG_INFO("error: received HTML instead of a ban list\n");
+ LOG_INFO(prelude, "error: received HTML instead of a ban list\n");
return;
}
if(strstrofs(data, "\r", 0) != -1)
{
- LOG_INFO("error: received carriage returns\n");
+ LOG_INFO(prelude, "error: received carriage returns\n");
return;
}
if((n % 4) != 0)
{
- LOG_INFO("error: received invalid item count: ", ftos(n), "\n");
+ LOG_INFO(prelude, "error: received invalid item count: ", ftos(n), "\n");
return;
}
- LOG_INFO("OK, ", ftos(n / 4), " items\n");
+ LOG_INFO(prelude, "OK, ", ftos(n / 4), " items\n");
for(i = 0; i < n; i += 4)
{
// the ban will be prolonged on the next sync
// or expire 5 seconds after the next timeout
Ban_Insert(ip, timeleft, strcat("ban synced from ", serverip, " at ", uri), 0);
- LOG_INFO("Ban list syncing: accepted ban of ", ip, " by ", serverip, " at ", uri, ": ");
- LOG_INFO(reason, "\n");
+ LOG_INFO("Ban list syncing: accepted ban of ", ip, " by ", serverip, " at ", uri, ": ", reason);
LABEL(skip)
}
this.maxs = PL_MAX_CONST;
if (!move_out_of_solid(this))
objerror(this, "could not get out of solid at all!");
- LOG_INFO("^1NOTE: this map needs FIXING. Spawnpoint at ", vtos(o - '0 0 1'));
- LOG_INFO(" needs to be moved out of solid, e.g. by '", ftos(this.origin.x - o.x));
- LOG_INFO(" ", ftos(this.origin.y - o.y));
- LOG_INFO(" ", ftos(this.origin.z - o.z), "'\n");
+ LOG_INFOF(
+ "^1NOTE: this map needs FIXING. Spawnpoint at %s needs to be moved out of solid, e.g. by %s",
+ vtos(o - '0 0 1'),
+ vtos(this.origin - o)
+ );
if (autocvar_g_spawnpoints_auto_move_out_of_solid)
{
if (!spawnpoint_nag)
if(time > client_cefc_accumulatortime + 1)
{
float t = client_cefc_accumulator / (time - client_cefc_accumulatortime);
- LOG_INFO("CEFC time: ", ftos(t * 1000), "ms; ");
int c_seeing = 0;
int c_seen = 0;
FOREACH_CLIENT(true, {
if(IS_PLAYER(it))
++c_seen;
});
- LOG_INFO("CEFC calls per second: ", ftos(c_seeing * (c_seen - 1) / t), "; ");
- LOG_INFO("CEFC 100% load at: ", ftos(solve_quadratic(t, -t, -1) * '0 1 0'), "\n");
-
+ LOG_INFO(
+ "CEFC time: ", ftos(t * 1000), "ms; ",
+ "CEFC calls per second: ", ftos(c_seeing * (c_seen - 1) / t), "; ",
+ "CEFC 100% load at: ", ftos(solve_quadratic(t, -t, -1) * '0 1 0')
+ );
client_cefc_accumulatortime = time;
client_cefc_accumulator = 0;
}