From a73f79e356dd25b6ea678379e7884ee45cc1977b Mon Sep 17 00:00:00 2001 From: TimePath Date: Sat, 13 Aug 2016 17:36:20 +1000 Subject: [PATCH] Unnecessary newlines are unnecessary --- qcsrc/client/csqcmodel_hooks.qc | 4 +- qcsrc/client/hud/hud.qc | 2 +- qcsrc/client/hud/panel/quickmenu.qc | 8 +-- qcsrc/client/main.qc | 8 +-- qcsrc/client/player_skeleton.qc | 2 +- qcsrc/client/view.qc | 4 +- qcsrc/common/animdecide.qh | 2 +- qcsrc/common/command/generic.qc | 10 +-- qcsrc/common/effects/effectinfo.qc | 4 +- qcsrc/common/effects/qc/globalsound.qc | 14 ++-- .../gamemodes/gamemode/nexball/nexball.qc | 2 +- .../gamemodes/gamemode/onslaught/onslaught.qc | 44 ++++++------ qcsrc/common/items/inventory.qh | 2 +- qcsrc/common/items/item/pickup.qh | 2 +- qcsrc/common/mapinfo.qc | 14 ++-- qcsrc/common/minigames/cl_minigames.qc | 12 ++-- qcsrc/common/minigames/minigame/nmm.qc | 2 +- qcsrc/common/minigames/minigame/ttt.qc | 16 ++--- qcsrc/common/minigames/sv_minigames.qc | 4 +- qcsrc/common/models/model.qh | 4 +- qcsrc/common/monsters/sv_monsters.qc | 4 +- qcsrc/common/mutators/base.qh | 6 +- qcsrc/common/mutators/mutator/nades/nades.qc | 2 +- .../mutator/physical_items/physical_items.qc | 2 +- .../mutator/random_gravity/random_gravity.qc | 2 +- .../mutators/mutator/superspec/superspec.qc | 6 +- qcsrc/common/notifications/all.qc | 2 +- qcsrc/common/notifications/all.qh | 6 +- qcsrc/common/physics/movetypes/movetypes.qc | 8 +-- qcsrc/common/physics/player.qc | 4 +- qcsrc/common/playerstats.qc | 20 +++--- qcsrc/common/sounds/sound.qh | 4 +- qcsrc/common/t_items.qc | 10 +-- qcsrc/common/triggers/func/door.qc | 2 +- qcsrc/common/triggers/target/music.qc | 4 +- qcsrc/common/turrets/checkpoint.qc | 2 +- qcsrc/common/turrets/sv_turrets.qc | 6 +- qcsrc/common/turrets/turret/ewheel.qc | 4 +- qcsrc/common/turrets/turret/mlrs.qc | 4 +- qcsrc/common/turrets/turret/walker.qc | 4 +- qcsrc/common/turrets/util.qc | 2 +- qcsrc/common/util.qc | 2 +- qcsrc/common/vehicles/sv_vehicles.qc | 10 +-- qcsrc/common/vehicles/vehicle/bumblebee.qc | 2 +- qcsrc/common/viewloc.qc | 6 +- qcsrc/common/weapons/all.qc | 4 +- qcsrc/common/weapons/all.qh | 2 +- qcsrc/common/weapons/weapon.qh | 2 +- qcsrc/common/weapons/weapon/porto.qc | 2 +- qcsrc/lib/csqcmodel/cl_model.qc | 2 +- qcsrc/lib/csqcmodel/cl_player.qc | 2 +- qcsrc/lib/i18n.qh | 2 +- qcsrc/lib/intrusivelist.qh | 2 +- qcsrc/lib/log.qh | 27 ++++---- qcsrc/lib/map.qh | 4 +- qcsrc/lib/net.qh | 2 +- qcsrc/lib/random.qc | 9 ++- qcsrc/lib/registry.qh | 4 +- qcsrc/lib/spawnfunc.qh | 4 +- qcsrc/lib/test.qh | 2 +- qcsrc/lib/urllib.qc | 2 +- qcsrc/lib/warpzone/common.qc | 10 +-- qcsrc/lib/warpzone/server.qc | 2 +- qcsrc/menu/draw.qc | 2 +- qcsrc/menu/item/label.qc | 2 +- qcsrc/menu/menu.qc | 4 +- qcsrc/menu/skin.qh | 2 +- qcsrc/menu/xonotic/serverlist.qc | 2 +- qcsrc/menu/xonotic/slider_resolution.qc | 10 +-- qcsrc/menu/xonotic/statslist.qc | 2 +- qcsrc/menu/xonotic/util.qc | 8 +-- qcsrc/server-testcase/framework.qc | 2 +- qcsrc/server/bot/default/aim.qc | 4 +- qcsrc/server/bot/default/bot.qc | 10 +-- qcsrc/server/bot/default/havocbot/havocbot.qc | 20 +++--- qcsrc/server/bot/default/havocbot/roles.qc | 2 +- qcsrc/server/bot/default/navigation.qc | 38 +++++------ qcsrc/server/bot/default/scripting.qc | 2 +- qcsrc/server/bot/default/waypoints.qc | 18 ++--- qcsrc/server/campaign.qc | 2 +- qcsrc/server/command/radarmap.qc | 2 +- qcsrc/server/command/sv_cmd.qc | 2 +- qcsrc/server/g_subs.qc | 8 +-- qcsrc/server/g_world.qc | 28 ++++---- qcsrc/server/ipban.qc | 8 +-- qcsrc/server/miscfunctions.qc | 10 +-- qcsrc/server/mutators/mutator/gamemode_ctf.qc | 26 +++---- .../mutators/mutator/gamemode_domination.qc | 2 +- .../mutators/mutator/gamemode_freezetag.qc | 4 +- .../mutators/mutator/gamemode_invasion.qc | 2 +- .../mutators/mutator/gamemode_keyhunt.qc | 16 ++--- qcsrc/server/mutators/mutator/gamemode_lms.qc | 2 +- qcsrc/server/mutators/mutator/gamemode_tdm.qc | 2 +- qcsrc/server/pathlib/main.qc | 68 +++++++++---------- qcsrc/server/pathlib/movenode.qc | 4 +- qcsrc/server/pathlib/path_waypoint.qc | 12 ++-- qcsrc/server/spawnpoints.qc | 2 +- qcsrc/server/weapons/weaponsystem.qc | 2 +- 98 files changed, 348 insertions(+), 350 deletions(-) diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 6eeb6c8bd..d6ee5f8f7 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -369,7 +369,7 @@ int CSQCPlayer_FallbackFrame(entity this, int f) case 29: return 4; // anim_duckwalkbackright -> anim_duckwalk case 30: return 4; // anim_duckwalkbackleft -> anim_duckwalk } - LOG_DEBUGF("Frame %d missing in model %s, and we have no fallback - FAIL!\n", f, this.model); + LOG_DEBUGF("Frame %d missing in model %s, and we have no fallback - FAIL!", f, this.model); return f; } void CSQCPlayer_FallbackFrame_Apply(entity this) @@ -433,7 +433,7 @@ void CSQCModel_AutoTagIndex_Apply(entity this) // we need to prevent this from 'appening this.tag_entity = NULL; this.drawmask = 0; - LOG_TRACE("h_ model lacks weapon attachment, but v_ model is attached to it\n"); + LOG_TRACE("h_ model lacks weapon attachment, but v_ model is attached to it"); } } else if(this.tag_entity.isplayermodel) diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index d575e8cb5..c5a3f7950 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -602,7 +602,7 @@ void HUD_Main() } } if (warning) - LOG_TRACE("Automatically fixed wrong/missing panel numbers in _hud_panelorder\n"); + LOG_TRACE("Automatically fixed wrong/missing panel numbers in _hud_panelorder"); cvar_set("_hud_panelorder", s); if(hud_panelorder_prev) diff --git a/qcsrc/client/hud/panel/quickmenu.qc b/qcsrc/client/hud/panel/quickmenu.qc index 470701966..b2d358884 100644 --- a/qcsrc/client/hud/panel/quickmenu.qc +++ b/qcsrc/client/hud/panel/quickmenu.qc @@ -156,7 +156,7 @@ bool QuickMenu_Open(string mode, string submenu) } else { - LOG_WARNF("Unrecognized mode %s\n", mode); + LOG_WARNF("Unrecognized mode %s", mode); return false; } @@ -292,7 +292,7 @@ bool QuickMenu_Page_Load(string target_submenu, bool new_page) // printf("^1 skipping %s\n", s); } if(QuickMenu_Buffer_Index == QuickMenu_Buffer_Size) - LOG_WARNF("Couldn't find submenu \"%s\"\n", z_submenu); + LOG_WARNF("Couldn't find submenu \"%s\"", z_submenu); } // only the last page can contain up to QUICKMENU_MAXLINES entries @@ -866,9 +866,9 @@ void QuickMenu_Default(string target_submenu) if(target_submenu != "" && !target_submenu_found) { - LOG_WARNF("Couldn't find submenu \"%s\"\n", target_submenu); + LOG_WARNF("Couldn't find submenu \"%s\"", target_submenu); if(prvm_language != "en") - LOG_WARNF("^3Warning: submenu must be in English\n", target_submenu); + LOG_WARNF("^3Warning: submenu must be in English", target_submenu); QuickMenu_Buffer_Size = 0; } } diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 402116173..28c1293c2 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -234,7 +234,7 @@ float SetTeam(entity o, int Team) default: if(GetTeam(Team, false) == NULL) { - LOG_TRACEF("trying to switch to unsupported team %d\n", Team); + LOG_TRACEF("trying to switch to unsupported team %d", Team); Team = NUM_SPECTATOR; } break; @@ -250,7 +250,7 @@ float SetTeam(entity o, int Team) default: if(GetTeam(Team, false) == NULL) { - LOG_TRACEF("trying to switch to unsupported team %d\n", Team); + LOG_TRACEF("trying to switch to unsupported team %d", Team); Team = NUM_SPECTATOR; } break; @@ -844,7 +844,7 @@ void CSQC_Ent_Update(entity this, bool isnew) time = savetime; if (!done) { - LOG_FATALF("CSQC_Ent_Update(%d) at %f with this=%i {.entnum=%d, .enttype=%d} t=%s (%d)\n", isnew, savetime, this, this.entnum, this.enttype, this.classname, t); + LOG_FATALF("CSQC_Ent_Update(%d) at %f with this=%i {.entnum=%d, .enttype=%d} t=%s (%d)", isnew, savetime, this, this.entnum, this.enttype, this.classname, t); } } @@ -879,7 +879,7 @@ void CSQC_Ent_Remove(entity this) if (autocvar_developer_csqcentities) LOG_INFOF("CSQC_Ent_Remove() with this=%i {.entnum=%d, .enttype=%d}\n", this, this.entnum, this.enttype); if (wasfreed(this)) { - LOG_WARN("CSQC_Ent_Remove called for already removed entity. Packet loss?\n"); + LOG_WARN("CSQC_Ent_Remove called for already removed entity. Packet loss?"); return; } if (this.enttype) Ent_Remove(this); diff --git a/qcsrc/client/player_skeleton.qc b/qcsrc/client/player_skeleton.qc index 85a798f3f..146e306a0 100644 --- a/qcsrc/client/player_skeleton.qc +++ b/qcsrc/client/player_skeleton.qc @@ -50,7 +50,7 @@ void skeleton_loadinfo(entity e) } } else - LOG_TRACE("No model parameters for ", e.model, "\n"); + LOG_TRACE("No model parameters for ", e.model); //dprint(e.model, " uses ", ftos(e.bone_upperbody), " ", ftos(e.fixbone), "\n"); get_model_parameters(string_null, 0); e.skeleton_info_modelindex = e.modelindex; diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index b0b98f977..700779216 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -792,7 +792,7 @@ void UpdateDamage() if (damage_dealt_time != damage_dealt_time_prev) { unaccounted_damage += unaccounted_damage_new; - LOG_TRACE("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")", "\n"); + LOG_TRACE("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")"); } damage_dealt_time_prev = damage_dealt_time; @@ -832,7 +832,7 @@ void HitSound() pitch_shift = mirror_value + (mirror_value - pitch_shift); } - LOG_TRACE("dmg total (dmg): ", ftos(unaccounted_damage), " , pitch shift: ", ftos(pitch_shift), "\n"); + LOG_TRACE("dmg total (dmg): ", ftos(unaccounted_damage), " , pitch shift: ", ftos(pitch_shift)); // todo: avoid very long and very short sounds from wave stretching using different sound files? seems unnecessary // todo: normalize sound pressure levels? seems unnecessary diff --git a/qcsrc/common/animdecide.qh b/qcsrc/common/animdecide.qh index ebdba4e5d..25106b2b9 100644 --- a/qcsrc/common/animdecide.qh +++ b/qcsrc/common/animdecide.qh @@ -16,7 +16,7 @@ CLASS(Animation, Object) if (f != -1) return f; }); #ifdef CSQC - LOG_DEBUGF("Missing animation for %s: %s\n", modelnameforindex(mdlidx), this.registered_id); + LOG_DEBUGF("Missing animation for %s: %s", modelnameforindex(mdlidx), this.registered_id); #endif return -1; } diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index 90d6cefe7..8f3449b3e 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -36,7 +36,7 @@ void Curl_URI_Get_Callback(int id, float status, string data) string do_cvar = curl_uri_get_cvar[i]; if(status != 0) { - LOG_TRACEF("error: status is %d\n", status); + LOG_TRACEF("error: status is %d", status); if(do_cvar) strunzone(do_cvar); return; @@ -426,9 +426,9 @@ void GenericCommand_settemp(float request, float argc) { float f = cvar_settemp(argv(1), argv(2)); if(f == 1) - LOG_TRACE("Creating new settemp tracker for ", argv(1), " and setting it to \"", argv(2), "\" temporarily.\n"); + LOG_TRACE("Creating new settemp tracker for ", argv(1), " and setting it to \"", argv(2), "\" temporarily."); else if(f == -1) - LOG_TRACE("Already had a tracker for ", argv(1), ", updating it to \"", argv(2), "\".\n"); + LOG_TRACE("Already had a tracker for ", argv(1), ", updating it to \"", argv(2), "\"."); // else cvar_settemp itself errors out return; @@ -456,9 +456,9 @@ void GenericCommand_settemp_restore(float request, float argc) float i = cvar_settemp_restore(); if(i) - LOG_TRACE("Restored ", ftos(i), " temporary cvar settings to their original values.\n"); + LOG_TRACE("Restored ", ftos(i), " temporary cvar settings to their original values."); else - LOG_TRACE("Nothing to restore.\n"); + LOG_TRACE("Nothing to restore."); return; } diff --git a/qcsrc/common/effects/effectinfo.qc b/qcsrc/common/effects/effectinfo.qc index 67312d905..cc87b31a1 100644 --- a/qcsrc/common/effects/effectinfo.qc +++ b/qcsrc/common/effects/effectinfo.qc @@ -253,7 +253,7 @@ void effectinfo_read() #undef p #undef MY default: - LOG_WARNF("Unknown property '%s'\n", k); + LOG_WARNF("Unknown property '%s'", k); break; } } @@ -306,7 +306,7 @@ GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt") LOG_INFOF("Reload with ^2cl_particles_reloadeffects data/%s^7.\n", filename); fclose(fh); } else { - LOG_WARNF("Could not open file '%s'!\n", filename); + LOG_WARNF("Could not open file '%s'!", filename); } return; } diff --git a/qcsrc/common/effects/qc/globalsound.qc b/qcsrc/common/effects/qc/globalsound.qc index c2fa827fa..573b52f22 100644 --- a/qcsrc/common/effects/qc/globalsound.qc +++ b/qcsrc/common/effects/qc/globalsound.qc @@ -114,7 +114,7 @@ else { // Can this happen? - LOG_WARNF("Missing entcs data for player %d\n", who); + LOG_WARNF("Missing entcs data for player %d", who); sound8(e, o, chan, sample, vol, atten, 0, 0); } return true; @@ -146,7 +146,7 @@ else { // Can this happen? - LOG_WARNF("Missing entcs data for player %d\n", who); + LOG_WARNF("Missing entcs data for player %d", who); sound8(e, o, chan, sample, vol, atten, 0, 0); } return true; @@ -219,7 +219,7 @@ int fh = fopen(f, FILE_READ); if (fh < 0) { - LOG_WARNF("Player sound file not found: %s\n", f); + LOG_WARNF("Player sound file not found: %s", f); return; } for (string s; (s = fgets(fh)); ) @@ -227,7 +227,7 @@ int n = tokenize_console(s); if (n != 3) { - if (n != 0) LOG_WARNF("Invalid sound info line: %s\n", s); + if (n != 0) LOG_WARNF("Invalid sound info line: %s", s); continue; } string file = argv(1); @@ -261,7 +261,7 @@ int fh = fopen(f, FILE_READ); if (fh < 0) { - if (strict) LOG_WARNF("Player sound file not found: %s\n", f); + if (strict) LOG_WARNF("Player sound file not found: %s", f); return false; } for (string s; (s = fgets(fh)); ) @@ -269,7 +269,7 @@ int n = tokenize_console(s); if (n != 3) { - if (n != 0) LOG_WARNF("Invalid sound info line: %s\n", s); + if (n != 0) LOG_WARNF("Invalid sound info line: %s", s); continue; } string key = argv(0); @@ -277,7 +277,7 @@ if (GetPlayerSoundSampleField_notFound) field = GetVoiceMessageSampleField(key); if (GetPlayerSoundSampleField_notFound) { - LOG_TRACEF("Invalid sound info field: %s\n", key); + LOG_TRACEF("Invalid sound info field: %s", key); continue; } string file = argv(1); diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index b50013ff7..0a6387fe4 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -459,7 +459,7 @@ spawnfunc(nexball_team) void nb_spawnteam(string teamname, float teamcolor) { - LOG_TRACE("^2spawned team ", teamname, "\n"); + LOG_TRACE("^2spawned team ", teamname); entity e = new(nexball_team); e.netname = teamname; e.cnt = teamcolor; diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc index 14ee4eceb..713c5d7de 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc @@ -236,14 +236,14 @@ void onslaught_updatelinks() { entity l; // first check if the game has ended - LOG_DEBUG("--- updatelinks ---\n"); + LOG_DEBUG("--- updatelinks ---"); // mark generators as being shielded and networked for(l = ons_worldgeneratorlist; l; l = l.ons_worldgeneratornext) { if (l.iscaptured) - LOG_DEBUG(strcat(etos(l), " (generator) belongs to team ", ftos(l.team), "\n")); + LOG_DEBUG(etos(l), " (generator) belongs to team ", ftos(l.team)); else - LOG_DEBUG(strcat(etos(l), " (generator) is destroyed\n")); + LOG_DEBUG(etos(l), " (generator) is destroyed"); l.islinked = l.iscaptured; l.isshielded = l.iscaptured; l.sprite.SendFlags |= 16; @@ -255,7 +255,7 @@ void onslaught_updatelinks() l.isshielded = true; int i; for(i = 0; i < 17; ++i) { l.isgenneighbor[i] = false; l.iscpneighbor[i] = false; } - LOG_DEBUG(strcat(etos(l), " (point) belongs to team ", ftos(l.team), "\n")); + LOG_DEBUG(etos(l), " (point) belongs to team ", ftos(l.team)); l.sprite.SendFlags |= 16; } // flow power outward from the generators through the network @@ -275,13 +275,13 @@ void onslaught_updatelinks() { stop = false; l.goalentity.islinked = true; - LOG_DEBUG(strcat(etos(l), " (link) is marking ", etos(l.goalentity), " (point) because its team matches ", etos(l.enemy), " (point)\n")); + LOG_DEBUG(etos(l), " (link) is marking ", etos(l.goalentity), " (point) because its team matches ", etos(l.enemy), " (point)"); } else if (!l.enemy.islinked) { stop = false; l.enemy.islinked = true; - LOG_DEBUG(strcat(etos(l), " (link) is marking ", etos(l.enemy), " (point) because its team matches ", etos(l.goalentity), " (point)\n")); + LOG_DEBUG(etos(l), " (link) is marking ", etos(l.enemy), " (point) because its team matches ", etos(l.goalentity), " (point)"); } } } @@ -294,7 +294,7 @@ void onslaught_updatelinks() { if(DIFF_TEAM(l.goalentity, l.enemy)) { - LOG_DEBUG(strcat(etos(l), " (link) is unshielding ", etos(l.enemy), " (point) because its team does not match ", etos(l.goalentity), " (point)\n")); + LOG_DEBUG(etos(l), " (link) is unshielding ", etos(l.enemy), " (point) because its team does not match ", etos(l.goalentity), " (point)"); l.enemy.isshielded = false; } if(l.goalentity.classname == "onslaught_generator") @@ -306,7 +306,7 @@ void onslaught_updatelinks() { if(DIFF_TEAM(l.goalentity, l.enemy)) { - LOG_DEBUG(strcat(etos(l), " (link) is unshielding ", etos(l.goalentity), " (point) because its team does not match ", etos(l.enemy), " (point)\n")); + LOG_DEBUG(etos(l), " (link) is unshielding ", etos(l.goalentity), " (point) because its team does not match ", etos(l.enemy), " (point)"); l.goalentity.isshielded = false; } if(l.enemy.classname == "onslaught_generator") @@ -320,13 +320,13 @@ void onslaught_updatelinks() { if (l.isshielded) { - LOG_DEBUG(strcat(etos(l), " (generator) is shielded\n")); + LOG_DEBUG(etos(l), " (generator) is shielded"); l.takedamage = DAMAGE_NO; l.bot_attack = false; } else { - LOG_DEBUG(strcat(etos(l), " (generator) is not shielded\n")); + LOG_DEBUG(etos(l), " (generator) is not shielded"); l.takedamage = DAMAGE_AIM; l.bot_attack = true; } @@ -338,7 +338,7 @@ void onslaught_updatelinks() { if (l.isshielded) { - LOG_DEBUG(strcat(etos(l), " (point) is shielded\n")); + LOG_DEBUG(etos(l), " (point) is shielded"); if (l.goalentity) { l.goalentity.takedamage = DAMAGE_NO; @@ -347,7 +347,7 @@ void onslaught_updatelinks() } else { - LOG_DEBUG(strcat(etos(l), " (point) is not shielded\n")); + LOG_DEBUG(etos(l), " (point) is not shielded"); if (l.goalentity) { l.goalentity.takedamage = DAMAGE_AIM; @@ -417,7 +417,7 @@ void ons_DelayedLinkSetup(entity this) if(!this.goalentity) { objerror(this, "can not find target\n"); } if(!this.enemy) { objerror(this, "can not find target2\n"); } - LOG_DEBUG(strcat(etos(this.goalentity), " linked with ", etos(this.enemy), "\n")); + LOG_DEBUG(etos(this.goalentity), " linked with ", etos(this.enemy)); this.SendFlags |= 3; setthink(this, ons_Link_CheckUpdate); this.nextthink = time; @@ -1305,8 +1305,8 @@ void havocbot_goalrating_ons_offenseitems(entity this, float ratingscale, vector if(!needweapons && !needarmor) return; - LOG_DEBUG(strcat(this.netname, " needs weapons ", ftos(needweapons) , "\n")); - LOG_DEBUG(strcat(this.netname, " needs armor ", ftos(needarmor) , "\n")); + LOG_DEBUG(this.netname, " needs weapons ", ftos(needweapons)); + LOG_DEBUG(this.netname, " needs armor ", ftos(needarmor)); // See what is around FOREACH_ENTITY_FLOAT(bot_pickup, true, @@ -1325,7 +1325,7 @@ void havocbot_goalrating_ons_offenseitems(entity this, float ratingscale, vector void havocbot_role_ons_setrole(entity this, int role) { - LOG_DEBUG(strcat(this.netname," switched to ")); + LOG_DEBUG(this.netname," switched to "); switch(role) { case HAVOCBOT_ONS_ROLE_DEFENSE: @@ -1347,7 +1347,7 @@ void havocbot_role_ons_setrole(entity this, int role) this.havocbot_role_timeout = 0; break; } - LOG_DEBUG("\n"); + LOG_DEBUG(""); } void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale) @@ -1403,7 +1403,7 @@ void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale if (!cp) return; - LOG_DEBUG(strcat(this.netname, " chose cp ranked ", ftos(bestvalue), "\n")); + LOG_DEBUG(this.netname, " chose cp ranked ", ftos(bestvalue)); if(cp.goalentity) { @@ -1444,12 +1444,12 @@ void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale { navigation_routerating(this, cp, ratingscale, 10000); } - LOG_DEBUG(strcat(this.netname, " found an attackable controlpoint at ", vtos(cp.origin) ,"\n")); + LOG_DEBUG(this.netname, " found an attackable controlpoint at ", vtos(cp.origin)); } else { // Should be touched - LOG_DEBUG(strcat(this.netname, " found a touchable controlpoint at ", vtos(cp.origin) ,"\n")); + LOG_DEBUG(this.netname, " found a touchable controlpoint at ", vtos(cp.origin)); found = false; // Look for auto generated waypoint @@ -1502,7 +1502,7 @@ bool havocbot_goalrating_ons_generator_attack(entity this, float ratingscale) if(bestwp) { - LOG_DEBUG("waypoints found around generator\n"); + LOG_DEBUG("waypoints found around generator"); navigation_routerating(this, bestwp, ratingscale, 10000); bestwp.cnt += 1; @@ -1515,7 +1515,7 @@ bool havocbot_goalrating_ons_generator_attack(entity this, float ratingscale) } else { - LOG_DEBUG("generator found without waypoints around\n"); + LOG_DEBUG("generator found without waypoints around"); // if there aren't waypoints near the generator go straight to it navigation_routerating(this, g, ratingscale, 10000); this.havocbot_attack_time = 0; diff --git a/qcsrc/common/items/inventory.qh b/qcsrc/common/items/inventory.qh index 4ca11c268..0cd365ff0 100644 --- a/qcsrc/common/items/inventory.qh +++ b/qcsrc/common/items/inventory.qh @@ -24,7 +24,7 @@ NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew) .int fld = inv_items[it.m_id]; int prev = this.(fld); int next = this.(fld) = ReadByte(); - LOG_TRACEF("%s: %.0f -> %.0f\n", it.m_name, prev, next); + LOG_TRACEF("%s: %.0f -> %.0f", it.m_name, prev, next); }); return true; } diff --git a/qcsrc/common/items/item/pickup.qh b/qcsrc/common/items/item/pickup.qh index 5949a71ed..684e6dde9 100644 --- a/qcsrc/common/items/item/pickup.qh +++ b/qcsrc/common/items/item/pickup.qh @@ -29,7 +29,7 @@ CLASS(Pickup, GameItem) TC(Pickup, this); bool b = Item_GiveTo(item, player); if (b) { - LOG_DEBUGF("entity %i picked up %s\n", player, this.m_name); + LOG_DEBUGF("entity %i picked up %s", player, this.m_name); player.inventory.inv_items[this.m_id]++; Inventory_update(player); } diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index a63f6613b..d9ca7e994 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -168,7 +168,7 @@ float _MapInfo_FilterGametype(int pGametype, int pFeatures, int pFlagsRequired, if(MapInfo_Get_ByName(_MapInfo_GlobItem(i), 1, NULL) == 2) // if we generated one... BAIL OUT and let the caller continue in the next frame. if(pAbortOnGenerate) { - LOG_TRACE("Autogenerated a .mapinfo, doing the rest later.\n"); + LOG_TRACE("Autogenerated a .mapinfo, doing the rest later."); MapInfo_progress = i / _MapInfo_globcount; return 0; } @@ -429,7 +429,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp LOG_TRACE("-> diameter ", ftos(diameter)); LOG_TRACE("; spawnpoints ", ftos(spawnpoints)); - LOG_TRACE("; modes ", ftos(MapInfo_Map_supportedGametypes), "\n"); + LOG_TRACE("; modes ", ftos(MapInfo_Map_supportedGametypes)); fclose(fh); @@ -805,7 +805,7 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s, { if(type == 0) // server set { - LOG_TRACE("Applying temporary setting ", t, " := ", s, "\n"); + LOG_TRACE("Applying temporary setting ", t, " := ", s); if(cvar("g_campaign")) cvar_set(t, s); // this is a wrapper and is always temporary anyway; no need to backup old values then else @@ -813,7 +813,7 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s, } else { - LOG_TRACE("Applying temporary client setting ", t, " := ", s, "\n"); + LOG_TRACE("Applying temporary client setting ", t, " := ", s); MapInfo_Map_clientstuff = strcat( MapInfo_Map_clientstuff, "cl_cmd settemp \"", t, "\" \"", s, "\"\n" ); @@ -1322,14 +1322,14 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn { if(cvar("g_mapinfo_allow_unsupported_modes_and_let_stuff_break")) { - LOG_SEVERE("can't play the selected map in the given game mode. Working with only the override settings.\n"); + LOG_SEVERE("can't play the selected map in the given game mode. Working with only the override settings."); _MapInfo_Map_ApplyGametypeEx("", t, t); return; // do not call Get_ByName! } if(MapInfo_Map_supportedGametypes == 0) { - LOG_SEVERE("Mapinfo system is not functional at all. Assuming deathmatch.\n"); + LOG_SEVERE("Mapinfo system is not functional at all. Assuming deathmatch."); MapInfo_Map_supportedGametypes = MAPINFO_TYPE_DEATHMATCH.m_flags; MapInfo_LoadMapSettings_SaveGameType(MAPINFO_TYPE_DEATHMATCH); _MapInfo_Map_ApplyGametypeEx("", MAPINFO_TYPE_DEATHMATCH, MAPINFO_TYPE_DEATHMATCH); @@ -1345,7 +1345,7 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn FOREACH(Gametypes, it.m_flags == _t, { t = it; break; }); // t is now a supported mode! - LOG_WARN("can't play the selected map in the given game mode. Falling back to a supported mode.\n"); + LOG_WARN("can't play the selected map in the given game mode. Falling back to a supported mode."); MapInfo_LoadMapSettings_SaveGameType(t); } MapInfo_Get_ByName(s, 1, t); diff --git a/qcsrc/common/minigames/cl_minigames.qc b/qcsrc/common/minigames/cl_minigames.qc index daca237b9..42f8c514e 100644 --- a/qcsrc/common/minigames/cl_minigames.qc +++ b/qcsrc/common/minigames/cl_minigames.qc @@ -74,7 +74,7 @@ MINIGAME_SIMPLELINKED_ENTITIES void minigame_autoclean_entity(entity e) { - LOG_DEBUG("CL Auto-cleaned: ",ftos(etof(e)), " (",e.classname,")\n"); + LOG_DEBUG("CL Auto-cleaned: ",ftos(etof(e)), " (",e.classname,")"); delete(e); } @@ -121,7 +121,7 @@ void activate_minigame(entity minigame) if ( !minigame.descriptor || minigame.classname != "minigame" ) { - LOG_TRACE("Trying to activate unregistered minigame ",minigame.netname," in client\n"); + LOG_TRACE("Trying to activate unregistered minigame ",minigame.netname," in client"); return; } @@ -174,7 +174,7 @@ void minigame_read_owner(entity this) this.owner = find(this.owner,netname,owner_name); while ( this.owner && this.owner.classname != "minigame" ); if ( !this.owner ) - LOG_TRACE("Got a minigame entity without a minigame!\n"); + LOG_TRACE("Got a minigame entity without a minigame!"); } NET_HANDLE(ENT_CLIENT_MINIGAME, bool isnew) { @@ -196,7 +196,7 @@ NET_HANDLE(ENT_CLIENT_MINIGAME, bool isnew) this.entremove = minigame_entremove; this.descriptor = minigame_get_descriptor(ReadString_Raw()); if ( !this.descriptor ) - LOG_TRACE("Got a minigame without a client-side descriptor!\n"); + LOG_TRACE("Got a minigame without a client-side descriptor!"); else this.minigame_event = this.descriptor.minigame_event; } @@ -212,7 +212,7 @@ NET_HANDLE(ENT_CLIENT_MINIGAME, bool isnew) minigame_read_owner(this); float ent = ReadLong(); this.minigame_playerslot = ent; - LOG_DEBUG("Player: ",entcs_GetName(ent-1),"\n"); + LOG_DEBUG("Player: ",entcs_GetName(ent-1)); activate = (ent == player_localnum+1 && this.owner && this.owner != active_minigame); @@ -238,7 +238,7 @@ NET_HANDLE(ENT_CLIENT_MINIGAME, bool isnew) { LOG_DEBUG("CL Reading entity: ",ftos(etof(this)), " classname:",this.classname," enttype:",ftos(this.enttype) ); - LOG_DEBUG(" sf:",ftos(sf)," netname:",this.netname,"\n\n"); + LOG_DEBUG(" sf:",ftos(sf)," netname:",this.netname); } return true; } diff --git a/qcsrc/common/minigames/minigame/nmm.qc b/qcsrc/common/minigames/minigame/nmm.qc index d36c5cd3f..78fb30f1d 100644 --- a/qcsrc/common/minigames/minigame/nmm.qc +++ b/qcsrc/common/minigames/minigame/nmm.qc @@ -369,7 +369,7 @@ int nmm_server_event(entity minigame, string event, ...) minigame.SendFlags |= MINIG_SF_UPDATE; } else - LOG_TRACE("Invalid move: ",...(2,string),"\n"); + LOG_TRACE("Invalid move: ", ...(2, string)); return 1; } } diff --git a/qcsrc/common/minigames/minigame/ttt.qc b/qcsrc/common/minigames/minigame/ttt.qc index 630462aa9..9c0ece163 100644 --- a/qcsrc/common/minigames/minigame/ttt.qc +++ b/qcsrc/common/minigames/minigame/ttt.qc @@ -421,7 +421,7 @@ int ttt_ai_random(int piecemask) f <<= 1; } - LOG_TRACE(sprintf("TTT AI: selected %x from %x\n", + LOG_TRACE(sprintf("TTT AI: selected %x from %x", RandomSelection_chosen_float, piecemask) ); return RandomSelection_chosen_float; } @@ -439,7 +439,7 @@ int ttt_ai_block3 ( int piecemask, int piecemask_free ) r |= ttt_ai_1of3(piecemask,TTT_AI_POSFLAG_A3,TTT_AI_POSFLAG_B3,TTT_AI_POSFLAG_C3); r |= ttt_ai_1of3(piecemask,TTT_AI_POSFLAG_A1,TTT_AI_POSFLAG_B2,TTT_AI_POSFLAG_C3); r |= ttt_ai_1of3(piecemask,TTT_AI_POSFLAG_A3,TTT_AI_POSFLAG_B2,TTT_AI_POSFLAG_C1); - LOG_TRACE(sprintf("TTT AI: possible 3 in a rows in %x: %x (%x)\n",piecemask,r, r&piecemask_free)); + LOG_TRACE(sprintf("TTT AI: possible 3 in a rows in %x: %x (%x)",piecemask,r, r&piecemask_free)); r &= piecemask_free; return ttt_ai_random(r); } @@ -452,15 +452,15 @@ string ttt_ai_choose_simple(int piecemask_self, int piecemask_opponent, int piec { int move = 0; - LOG_TRACE("TTT AI: checking winning move\n"); + LOG_TRACE("TTT AI: checking winning move"); if (( move = ttt_ai_block3(piecemask_self,piecemask_free) )) return ttt_ai_piece_flag2pos(move); // place winning move - LOG_TRACE("TTT AI: checking opponent's winning move\n"); + LOG_TRACE("TTT AI: checking opponent's winning move"); if (( move = ttt_ai_block3(piecemask_opponent,piecemask_free) )) return ttt_ai_piece_flag2pos(move); // block opponent - LOG_TRACE("TTT AI: random move\n"); + LOG_TRACE("TTT AI: random move"); return ttt_ai_piece_flag2pos(ttt_ai_random(piecemask_free)); } @@ -510,12 +510,12 @@ void ttt_aimove(entity minigame) } // TODO multiple AI difficulties - LOG_TRACE(sprintf("TTT AI: self: %x opponent: %x free: %x\n", + LOG_TRACE(sprintf("TTT AI: self: %x opponent: %x free: %x", piecemask_self, piecemask_opponent, piecemask_free)); pos = ttt_ai_choose_simple(piecemask_self, piecemask_opponent, piecemask_free); - LOG_TRACE("TTT AI: chosen move: ",pos,"\n\n"); + LOG_TRACE("TTT AI: chosen move: ", pos); if ( !pos ) - LOG_TRACE("Tic Tac Toe AI has derped!\n"); + LOG_TRACE("Tic Tac Toe AI has derped!"); else ttt_move(minigame,aiplayer,pos); } diff --git a/qcsrc/common/minigames/sv_minigames.qc b/qcsrc/common/minigames/sv_minigames.qc index 299c831dc..da04340a6 100644 --- a/qcsrc/common/minigames/sv_minigames.qc +++ b/qcsrc/common/minigames/sv_minigames.qc @@ -176,7 +176,7 @@ entity start_minigame(entity player, string minigame ) GameLogEcho(strcat(":minigame:start:",minig.netname)); if ( ! minigame_addplayer(minig,player) ) { - LOG_TRACE("Minigame ",minig.netname," rejected the first player join!\n"); + LOG_TRACE("Minigame ",minig.netname," rejected the first player join!"); end_minigame(minig); return NULL; } @@ -235,7 +235,7 @@ void end_minigame(entity minigame_session) while( (e = findentity(e, owner, minigame_session)) ) if ( e.minigame_autoclean ) { - LOG_TRACE("SV Auto-cleaned: ",ftos(etof(e)), " (",e.classname,")\n"); + LOG_TRACE("SV Auto-cleaned: ",ftos(etof(e)), " (",e.classname,")"); delete(e); } diff --git a/qcsrc/common/models/model.qh b/qcsrc/common/models/model.qh index 1610240a7..7f20dc004 100644 --- a/qcsrc/common/models/model.qh +++ b/qcsrc/common/models/model.qh @@ -15,10 +15,10 @@ CLASS(Model, Object) TC(Model, this); string s = this.model_str(); if (s != "" && s != "null" && !fexists(s)) { - LOG_WARNF("Missing model: \"%s\"\n", s); + LOG_WARNF("Missing model: \"%s\"", s); return; } - profile(sprintf("precache_model(\"%s\")\n", s)); + profile(sprintf("precache_model(\"%s\")", s)); precache_model(s); } ENDCLASS(Model) diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index f03a51368..021d6ddfa 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -247,7 +247,7 @@ void Monster_Sound_Precache(string f) { if(tokenize_console(s) != 3) { - LOG_TRACE("Invalid sound info line: ", s, "\n"); + LOG_TRACE("Invalid sound info line: ", s); continue; } PrecacheGlobalSound(strcat(argv(1), " ", argv(2))); @@ -302,7 +302,7 @@ bool Monster_Sounds_Load(entity this, string f, int first) fh = fopen(f, FILE_READ); if(fh < 0) { - LOG_TRACE("Monster sound file not found: ", f, "\n"); + LOG_TRACE("Monster sound file not found: ", f); return false; } while((s = fgets(fh))) diff --git a/qcsrc/common/mutators/base.qh b/qcsrc/common/mutators/base.qh index a6e367178..119014b08 100644 --- a/qcsrc/common/mutators/base.qh +++ b/qcsrc/common/mutators/base.qh @@ -203,7 +203,7 @@ NET_HANDLE(Mutator, bool isNew) WITH(bool, mutator_log, true, LAMBDA( FOREACH(Mutators, it.registered_id == s, { Mutator_Add(it); ++added; }); )); - if (added > 1) LOG_WARNF("Added more than one mutator for %s\n", s); + if (added > 1) LOG_WARNF("Added more than one mutator for %s", s); } } #endif @@ -227,7 +227,7 @@ bool Mutator_Add(Mutator mut) mutatorfunc_t func = mut.mutatorfunc; if (!func(MUTATOR_ADDING)) { // good - if (mutator_log) LOG_TRACEF("Mutator: added %s\n", mut.m_name); + if (mutator_log) LOG_TRACEF("Mutator: added %s", mut.m_name); #ifdef SVQC Net_LinkEntity(mut, false, 0, Mutator_SendEntity); #endif @@ -257,7 +257,7 @@ void Mutator_Remove(Mutator mut) // baaaaad error("Mutator_Remove: removing mutator failed"); } - if (mutator_log) LOG_TRACEF("Mutator: removed %s\n", mut.m_name); + if (mutator_log) LOG_TRACEF("Mutator: removed %s", mut.m_name); #ifdef SVQC Net_UnlinkEntity(mut); #endif diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index fdde99856..fdbddc80a 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -1174,7 +1174,7 @@ CLASS(NadeOffhand, OffhandWeapon) if (held_nade) { player.nade_timer = bound(0, (time - held_nade.nade_time_primed) / autocvar_g_nades_nade_lifetime, 1); - // LOG_TRACEF("%d %d\n", player.nade_timer, time - held_nade.nade_time_primed); + // LOG_TRACEF("%d %d", player.nade_timer, time - held_nade.nade_time_primed); makevectors(player.angles); held_nade.velocity = player.velocity; setorigin(held_nade, player.origin + player.view_ofs + v_forward * 8 + v_right * -8 + v_up * 0); diff --git a/qcsrc/common/mutators/mutator/physical_items/physical_items.qc b/qcsrc/common/mutators/mutator/physical_items/physical_items.qc index 56705cbd2..f015baeaa 100644 --- a/qcsrc/common/mutators/mutator/physical_items/physical_items.qc +++ b/qcsrc/common/mutators/mutator/physical_items/physical_items.qc @@ -10,7 +10,7 @@ REGISTER_MUTATOR(physical_items, cvar("g_physical_items")) { if (!(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE"))) { - LOG_TRACE("Warning: Physical items are enabled but no physics engine can be used. Reverting to old items.\n"); + LOG_TRACE("Warning: Physical items are enabled but no physics engine can be used. Reverting to old items."); return -1; } } diff --git a/qcsrc/common/mutators/mutator/random_gravity/random_gravity.qc b/qcsrc/common/mutators/mutator/random_gravity/random_gravity.qc index a384a2b9c..9706aeca7 100644 --- a/qcsrc/common/mutators/mutator/random_gravity/random_gravity.qc +++ b/qcsrc/common/mutators/mutator/random_gravity/random_gravity.qc @@ -35,7 +35,7 @@ MUTATOR_HOOKFUNCTION(random_gravity, SV_StartFrame) gravity_delay = time + autocvar_g_random_gravity_delay; - LOG_TRACE("Gravity is now: ", ftos(autocvar_sv_gravity), "\n"); + LOG_TRACE("Gravity is now: ", ftos(autocvar_sv_gravity)); } MUTATOR_HOOKFUNCTION(random_gravity, BuildMutatorsString) diff --git a/qcsrc/common/mutators/mutator/superspec/superspec.qc b/qcsrc/common/mutators/mutator/superspec/superspec.qc index cf6a7bf5e..947ff01bb 100644 --- a/qcsrc/common/mutators/mutator/superspec/superspec.qc +++ b/qcsrc/common/mutators/mutator/superspec/superspec.qc @@ -47,7 +47,7 @@ void superspec_save_client_conf(entity this) fh = fopen(fn, FILE_WRITE); if(fh < 0) { - LOG_TRACE("^1ERROR: ^7 superspec can not open ", fn, " for writing.\n"); + LOG_TRACE("^1ERROR: ^7 superspec can not open ", fn, " for writing."); } else { @@ -415,14 +415,14 @@ MUTATOR_HOOKFUNCTION(superspec, ClientConnect) fh = fopen(fn, FILE_READ); if(fh < 0) { - LOG_TRACE("^1ERROR: ^7 superspec can not open ", fn, " for reading.\n"); + LOG_TRACE("^1ERROR: ^7 superspec can not open ", fn, " for reading."); } else { string _magic = fgets(fh); if(_magic != _SSMAGIX) { - LOG_TRACE("^1ERROR^7 While reading superspec options file: unknown magic\n"); + LOG_TRACE("^1ERROR^7 While reading superspec options file: unknown magic"); } else { diff --git a/qcsrc/common/notifications/all.qc b/qcsrc/common/notifications/all.qc index 2b3dbdfbe..e4f082355 100644 --- a/qcsrc/common/notifications/all.qc +++ b/qcsrc/common/notifications/all.qc @@ -1210,7 +1210,7 @@ void Local_Notification(MSG net_type, Notification net_name, ...count) Get_Notif_TypeName(net_type) )); #endif - LOG_WARNF("Incorrect usage of Local_Notification: %s\n", "Null notification"); + LOG_WARNF("Incorrect usage of Local_Notification: %s", "Null notification"); return; } diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index c7b1ec8fc..983b69f3f 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -32,7 +32,7 @@ string Get_Notif_TypeName(MSG net_type) case MSG_MULTI: return "MSG_MULTI"; case MSG_CHOICE: return "MSG_CHOICE"; } - LOG_WARNF("Get_Notif_TypeName(%d): Improper net type!\n", ORDINAL(net_type)); + LOG_WARNF("Get_Notif_TypeName(%d): Improper net type!", ORDINAL(net_type)); return ""; } @@ -252,7 +252,7 @@ string Get_Notif_BroadcastName(NOTIF broadcast) case NOTIF_TEAM: return "NOTIF_TEAM"; case NOTIF_TEAM_EXCEPT: return "NOTIF_TEAM_EXCEPT"; } - LOG_WARNF("Get_Notif_BroadcastName(%d): Improper broadcast!\n", broadcast); + LOG_WARNF("Get_Notif_BroadcastName(%d): Improper broadcast!", broadcast); return ""; } @@ -684,7 +684,7 @@ Notification Get_Notif_Ent(MSG net_type, int net_name) { Notification it = _Notifications_from(net_name, NULL); if (it.nent_type != net_type) { - LOG_WARNF("Get_Notif_Ent(%s (%d), %s (%d)): Improper net type '%s'!\n", + LOG_WARNF("Get_Notif_Ent(%s (%d), %s (%d)): Improper net type '%s'!", Get_Notif_TypeName(net_type), net_type, it.registered_id, net_name, Get_Notif_TypeName(it.nent_type) diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index 0b27f727a..1810fb841 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -448,12 +448,12 @@ bool _Movetype_UnstickEntity(entity this) // SV_UnstickEntity X(17) #undef X { - LOG_DEBUGF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n", + LOG_DEBUGF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)", etof(this), this.classname, vtos(this.origin)); return false; } } - LOG_DEBUGF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n", + LOG_DEBUGF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)", etof(this), this.classname, vtos(this.origin)); _Movetype_LinkEdict(this, true); return true; @@ -569,7 +569,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!\n"); + LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!"); break; case MOVETYPE_NONE: break; @@ -609,7 +609,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!\n"); + LOG_DEBUGF("Physics: Lacking QuakeC support for Push movetype, FIX ME by using engine physics!"); break; case MOVETYPE_NONE: break; diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 6823c2963..4fe8c88f5 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -374,7 +374,7 @@ bool PlayerJump(entity this) { #ifdef SVQC if(autocvar_speedmeter) - LOG_TRACE(strcat("landing velocity: ", vtos(this.velocity), " (abs: ", ftos(vlen(this.velocity)), ")\n")); + LOG_TRACE("landing velocity: ", vtos(this.velocity), " (abs: ", ftos(vlen(this.velocity)), ")"); #endif if(this.lastground < time - 0.3) { @@ -384,7 +384,7 @@ bool PlayerJump(entity this) } #ifdef SVQC if(this.jumppadcount > 1) - LOG_TRACE(strcat(ftos(this.jumppadcount), "x jumppad combo\n")); + LOG_TRACE(ftos(this.jumppadcount), "x jumppad combo"); this.jumppadcount = 0; #endif } diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index b00bdcf8d..ad5822126 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -379,9 +379,9 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status) { // url_fclose is processing, we got a response for writing the data // this must come from HTTP - LOG_TRACE("Got response from player stats server:\n"); - while((s = url_fgets(fh))) { LOG_TRACE(" ", s, "\n"); } - LOG_TRACE("End of response.\n"); + LOG_TRACE("Got response from player stats server:"); + while((s = url_fgets(fh))) { LOG_TRACE(" ", s); } + LOG_TRACE("End of response."); url_fclose(fh); break; } @@ -389,7 +389,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status) case URL_READY_CLOSED: { // url_fclose has finished - LOG_TRACE("Player stats written\n"); + LOG_TRACE("Player stats written"); PlayerStats_GameReport_DelayMapVote = false; if(PS_GR_OUT_DB >= 0) { @@ -430,7 +430,7 @@ void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest) // now request the information uri = strcat(uri, "/player/", uri_escape(uri_escape(uri_escape(joiningplayer.crypto_idfp))), "/elo.txt"); - LOG_TRACE("Retrieving playerstats from URL: ", uri, "\n"); + LOG_TRACE("Retrieving playerstats from URL: ", uri); url_single_fopen( uri, FILE_APPEND, @@ -469,7 +469,7 @@ void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer) { // determine whether we should retrieve playerbasic information again - LOG_TRACEF("PlayerStats_PlayerBasic_CheckUpdate('%s'): %f\n", + LOG_TRACEF("PlayerStats_PlayerBasic_CheckUpdate('%s'): %f", joiningplayer.netname, time ); @@ -492,7 +492,7 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status) { case URL_READY_CANWRITE: { - LOG_TRACE("-- Sending data to player stats server\n"); + LOG_TRACE("-- Sending data to player stats server"); /*url_fputs(fh, "V 1\n"); #ifdef WATERMARK url_fputs(fh, sprintf("R %s\n", WATERMARK)); @@ -619,7 +619,7 @@ void PlayerStats_PlayerDetail_AddItem(string event, string data) // now actually set the event data db_put(PS_D_IN_DB, sprintf("#%s", event), data); - LOG_TRACE("Added item ", sprintf("#%s", event), "=", data, " to PS_D_IN_DB\n"); + LOG_TRACE("Added item ", sprintf("#%s", event), "=", data, " to PS_D_IN_DB"); } void PlayerStats_PlayerDetail() @@ -632,7 +632,7 @@ void PlayerStats_PlayerDetail() PS_D_IN_DB = db_create(); //uri = strcat(uri, "/player/", uri_escape(crypto_getmyidfp(0))); - LOG_TRACE("Retrieving playerstats from URL: ", autocvar_g_playerstats_playerdetail_uri, "\n"); + LOG_TRACE("Retrieving playerstats from URL: ", autocvar_g_playerstats_playerdetail_uri); url_single_fopen( autocvar_g_playerstats_playerdetail_uri, FILE_APPEND, @@ -687,7 +687,7 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity unused, float status) { case URL_READY_CANWRITE: { - LOG_TRACE("PlayerStats_PlayerDetail_Handler(): Sending data to player stats server...\n"); + LOG_TRACE("PlayerStats_PlayerDetail_Handler(): Sending data to player stats server..."); url_fputs(fh, "V 1\n"); #ifdef WATERMARK url_fputs(fh, sprintf("R %s\n", WATERMARK)); diff --git a/qcsrc/common/sounds/sound.qh b/qcsrc/common/sounds/sound.qh index 73442509c..a8aa94edf 100644 --- a/qcsrc/common/sounds/sound.qh +++ b/qcsrc/common/sounds/sound.qh @@ -114,7 +114,7 @@ CLASS(Sound, Object) /**/ #define tryext(ext) { string s = strcat(base, "." #ext); if (fexists(strcat("sound/", s))) return s; } extensions(tryext); - LOG_WARNF("Missing sound: \"%s\"\n", strcat("sound/", base)); + LOG_WARNF("Missing sound: \"%s\"", strcat("sound/", base)); #undef tryext #undef extensions return string_null; @@ -125,7 +125,7 @@ CLASS(Sound, Object) TC(Sound, this); string s = Sound_fixpath(this); if (!s) return; - profile(sprintf("precache_sound(\"%s\")\n", s)); + profile(sprintf("precache_sound(\"%s\")", s)); precache_sound(s); } ENDCLASS(Sound) diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index e53963e2f..bc914d853 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -230,7 +230,7 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew) else { this.draw = ItemDraw; - LOG_TRACE("Simple item requested for ", _fn, " but no model exists for it\n"); + LOG_TRACE("Simple item requested for ", _fn, " but no model exists for it"); } } @@ -239,7 +239,7 @@ NET_HANDLE(ENT_CLIENT_ITEM, bool isnew) if(this.mdl == "") - LOG_TRACE("^1WARNING!^7 this.mdl is unset for item ", this.classname, ", tell tZork about this!\n"); + LOG_TRACE("^1WARNING!^7 this.mdl is unset for item ", this.classname, ", tell tZork about this!"); precache_model(this.mdl); _setmodel(this, this.mdl); @@ -334,7 +334,7 @@ bool ItemSend(entity this, entity to, int sf) WriteShort(MSG_ENTITY, this.fade_start); if(this.mdl == "") - LOG_TRACE("^1WARNING!^7 this.mdl is unset for item ", this.classname, "expect a crash just about now\n"); + LOG_TRACE("^1WARNING!^7 this.mdl is unset for item ", this.classname, "expect a crash just about now"); WriteString(MSG_ENTITY, this.mdl); } @@ -878,7 +878,7 @@ void Item_FindTeam(entity this) if(this.effects & EF_NODRAW) { // marker for item team search - LOG_TRACE("Initializing item team ", ftos(this.team), "\n"); + LOG_TRACE("Initializing item team ", ftos(this.team)); RandomSelection_Init(); FOREACH_ENTITY_FLOAT(team, this.team, { @@ -1166,7 +1166,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default // why not flags & fl_item? FOREACH_ENTITY_RADIUS(this.origin, 3, it.is_item, { LOG_TRACE("XXX Found duplicated item: ", itemname, vtos(this.origin)); - LOG_TRACE(" vs ", it.netname, vtos(it.origin), "\n"); + LOG_TRACE(" vs ", it.netname, vtos(it.origin)); error("Mapper sucks."); }); this.is_item = true; diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index f89f67d7f..706784eda 100644 --- a/qcsrc/common/triggers/func/door.qc +++ b/qcsrc/common/triggers/func/door.qc @@ -525,7 +525,7 @@ void LinkDoors(entity this) break; } } - LOG_TRACE("\n"); + LOG_TRACE(""); // collect health, targetname, message, size cmins = this.absmin; diff --git a/qcsrc/common/triggers/target/music.qc b/qcsrc/common/triggers/target/music.qc index 7abcd6740..ff195f03f 100644 --- a/qcsrc/common/triggers/target/music.qc +++ b/qcsrc/common/triggers/target/music.qc @@ -223,7 +223,7 @@ void Net_TargetMusic() _sound(e, CH_BGM_SINGLE, e.noise, 0, ATTEN_NONE); if(getsoundtime(e, CH_BGM_SINGLE) < 0) { - LOG_TRACEF("Cannot initialize sound %s\n", e.noise); + LOG_TRACEF("Cannot initialize sound %s", e.noise); strunzone(e.noise); e.noise = string_null; } @@ -310,7 +310,7 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_MUSIC, bool isnew) _sound(this, CH_BGM_SINGLE, this.noise, 0, ATTEN_NONE); if(getsoundtime(this, CH_BGM_SINGLE) < 0) { - LOG_TRACEF("Cannot initialize sound %s\n", this.noise); + LOG_TRACEF("Cannot initialize sound %s", this.noise); strunzone(this.noise); this.noise = string_null; } diff --git a/qcsrc/common/turrets/checkpoint.qc b/qcsrc/common/turrets/checkpoint.qc index dc48fd115..fb56d3ecc 100644 --- a/qcsrc/common/turrets/checkpoint.qc +++ b/qcsrc/common/turrets/checkpoint.qc @@ -56,7 +56,7 @@ void turret_checkpoint_init(entity this) { this.enemy = find(NULL, targetname, this.target); if(this.enemy == NULL) - LOG_TRACE("A turret_checkpoint faild to find its target!\n"); + LOG_TRACE("A turret_checkpoint faild to find its target!"); } //setthink(this, turret_checkpoint_think); //this.nextthink = time + tc_acum + 0.25; diff --git a/qcsrc/common/turrets/sv_turrets.qc b/qcsrc/common/turrets/sv_turrets.qc index f1515d070..a387fefc4 100644 --- a/qcsrc/common/turrets/sv_turrets.qc +++ b/qcsrc/common/turrets/sv_turrets.qc @@ -825,7 +825,7 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl */ #ifdef TURRET_DEBUG_TARGETSELECT - LOG_TRACE("Target:",e_target.netname," is a valid target for ",e_turret.netname,"\n"); + LOG_TRACE("Target:",e_target.netname," is a valid target for ",e_turret.netname); #endif return 1; @@ -1175,7 +1175,7 @@ void turret_think(entity this) */ void turret_use(entity this, entity actor, entity trigger) { - LOG_TRACE("Turret ",this.netname, " used by ", actor.classname, "\n"); + LOG_TRACE("Turret ",this.netname, " used by ", actor.classname); this.team = actor.team; @@ -1361,7 +1361,7 @@ bool turret_initialize(entity this, Turret tur) if (this.tur_defend == NULL) { this.target = ""; - LOG_TRACE("Turret has invalid defendpoint!\n"); + LOG_TRACE("Turret has invalid defendpoint!"); } } diff --git a/qcsrc/common/turrets/turret/ewheel.qc b/qcsrc/common/turrets/turret/ewheel.qc index f0590f818..a86acdb27 100644 --- a/qcsrc/common/turrets/turret/ewheel.qc +++ b/qcsrc/common/turrets/turret/ewheel.qc @@ -196,12 +196,12 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it)) e = find(NULL, targetname, it.target); if (!e) { - LOG_TRACE("Initital waypoint for ewheel does NOT exsist, fix your map!\n"); + LOG_TRACE("Initital waypoint for ewheel does NOT exsist, fix your map!"); it.target = ""; } if (e.classname != "turret_checkpoint") - LOG_TRACE("Warning: not a turrret path\n"); + LOG_TRACE("Warning: not a turrret path"); else { diff --git a/qcsrc/common/turrets/turret/mlrs.qc b/qcsrc/common/turrets/turret/mlrs.qc index 0d6e9e9e9..316d3b9a0 100644 --- a/qcsrc/common/turrets/turret/mlrs.qc +++ b/qcsrc/common/turrets/turret/mlrs.qc @@ -30,8 +30,8 @@ METHOD(MLRSTurret, tr_think, void(MLRSTurret thistur, entity it)) it.tur_head.frame = bound(0, 6 - floor(0.1 + it.ammo / it.shot_dmg), 6); if(it.tur_head.frame < 0) { - LOG_TRACE("ammo:",ftos(it.ammo),"\n"); - LOG_TRACE("shot_dmg:",ftos(it.shot_dmg),"\n"); + LOG_TRACE("ammo:",ftos(it.ammo)); + LOG_TRACE("shot_dmg:",ftos(it.shot_dmg)); } } METHOD(MLRSTurret, tr_setup, void(MLRSTurret this, entity it)) diff --git a/qcsrc/common/turrets/turret/walker.qc b/qcsrc/common/turrets/turret/walker.qc index ff2ce88c7..727da27f9 100644 --- a/qcsrc/common/turrets/turret/walker.qc +++ b/qcsrc/common/turrets/turret/walker.qc @@ -608,12 +608,12 @@ METHOD(WalkerTurret, tr_setup, void(WalkerTurret this, entity it)) e = find(NULL, targetname, it.target); if (!e) { - LOG_TRACE("Initital waypoint for walker does NOT exsist, fix your map!\n"); + LOG_TRACE("Initital waypoint for walker does NOT exsist, fix your map!"); it.target = ""; } if (e.classname != "turret_checkpoint") - LOG_TRACE("Warning: not a turrret path\n"); + LOG_TRACE("Warning: not a turrret path"); else { #ifdef WALKER_FANCYPATHING diff --git a/qcsrc/common/turrets/util.qc b/qcsrc/common/turrets/util.qc index 2c33c165a..8a6a5ee87 100644 --- a/qcsrc/common/turrets/util.qc +++ b/qcsrc/common/turrets/util.qc @@ -6,7 +6,7 @@ float turret_tag_fire_update(entity this) { if(!this.tur_head) { - LOG_DEBUG("Call to turret_tag_fire_update with this.tur_head missing!\n"); + LOG_DEBUG("Call to turret_tag_fire_update with this.tur_head missing!"); this.tur_shotorg = '0 0 0'; return false; } diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 6f15936c4..9cf439f52 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -592,7 +592,7 @@ float cvar_settemp(string tmp_cvar, string tmp_value) if (!(tmp_cvar || tmp_value)) { - LOG_TRACE("Error: Invalid usage of cvar_settemp(string, string); !\n"); + LOG_TRACE("Error: Invalid usage of cvar_settemp(string, string); !"); return 0; } diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index f7c5a5574..39f959d14 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -532,7 +532,7 @@ void vehicles_setreturn(entity veh) void vehicle_use(entity this, entity actor, entity trigger) { - LOG_DEBUG("vehicle ", this.netname, " used by ", actor.classname, "\n"); + LOG_DEBUG("vehicle ", this.netname, " used by ", actor.classname); this.tur_head.team = actor.team; @@ -543,7 +543,7 @@ void vehicle_use(entity this, entity actor, entity trigger) if(this.active == ACTIVE_ACTIVE && !IS_DEAD(this) && !gameover) { - LOG_DEBUG("Respawning vehicle: ", this.netname, "\n"); + LOG_DEBUG("Respawning vehicle: ", this.netname); if(this.effects & EF_NODRAW) { setthink(this, vehicles_spawn); @@ -765,7 +765,7 @@ void vehicles_exit(entity vehic, bool eject) if(vehicles_exit_running) { - LOG_TRACE("^1vehicles_exit already running! this is not good...\n"); + LOG_TRACE("^1vehicles_exit already running! this is not good..."); return; } @@ -1060,7 +1060,7 @@ void vehicles_reset(entity this) // initialization void vehicles_spawn(entity this) { - LOG_DEBUG("Spawning vehicle: ", this.classname, "\n"); + LOG_DEBUG("Spawning vehicle: ", this.classname); // disown & reset this.vehicle_hudmodel.viewmodelforclient = this; @@ -1126,7 +1126,7 @@ bool vehicle_initialize(entity this, Vehicle info, bool nodrop) this.vehicle_controller = find(NULL, target, this.targetname); if(!this.vehicle_controller) { - LOG_DEBUG("^1WARNING: ^7Vehicle with invalid .targetname\n"); + LOG_DEBUG("^1WARNING: ^7Vehicle with invalid .targetname"); this.active = ACTIVE_ACTIVE; } else diff --git a/qcsrc/common/vehicles/vehicle/bumblebee.qc b/qcsrc/common/vehicles/vehicle/bumblebee.qc index 3c0ccaabf..9f718e34b 100644 --- a/qcsrc/common/vehicles/vehicle/bumblebee.qc +++ b/qcsrc/common/vehicles/vehicle/bumblebee.qc @@ -313,7 +313,7 @@ bool bumblebee_gunner_enter(entity this, entity player) } else if(!vehic.gunner1 && time >= vehic.gun1.phase) { gunner = vehic.gun1; vehic.gunner1 = player; } else if(!vehic.gunner2 && time >= vehic.gun2.phase) { gunner = vehic.gun2; vehic.gunner2 = player; } - else { LOG_TRACE("Vehicle is full, fail\n"); return false; } + else { LOG_TRACE("Vehicle is full, fail"); return false; } player.vehicle = gunner; player.angles = vehic.angles; diff --git a/qcsrc/common/viewloc.qc b/qcsrc/common/viewloc.qc index 23b307922..4b6a6997a 100644 --- a/qcsrc/common/viewloc.qc +++ b/qcsrc/common/viewloc.qc @@ -136,9 +136,9 @@ void viewloc_SetViewLocation() } #if 0 - LOG_TRACE(vtos(camera_position), "\n"); - LOG_TRACE(vtos(old_camera_angle), "\n"); - LOG_TRACE(vtos(camera_angle), "\n"); + LOG_TRACE(vtos(camera_position)); + LOG_TRACE(vtos(old_camera_angle)); + LOG_TRACE(vtos(camera_angle)); #endif freeze_org = getpropertyvec(VF_ORIGIN); diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index d4479dac7..2b75ec031 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -462,7 +462,7 @@ void CL_WeaponEntity_SetModel(entity this, string name, bool _anim) } else { - LOG_WARNF("weapon model %s does not support the 'shot' tag, will display shots TOTALLY wrong\n", + LOG_WARNF("weapon model %s does not support the 'shot' tag, will display shots TOTALLY wrong", this.model); this.movedir = '0 0 0'; } @@ -481,7 +481,7 @@ void CL_WeaponEntity_SetModel(entity this, string name, bool _anim) } else { - LOG_WARNF("weapon model %s does not support the 'shell' tag, will display casings wrong\n", + LOG_WARNF("weapon model %s does not support the 'shell' tag, will display casings wrong", this.model); this.spawnorigin = this.movedir; } diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index bff6e6db7..a3f7eb4d0 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -311,7 +311,7 @@ STATIC_INIT(register_weapons_done) else inaccessible = strcat(inaccessible, "\n", it.netname); }); - if (inaccessible) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s\n", inaccessible); + if (inaccessible) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible); #ifdef CSQC FOREACH(Weapons, true, it.wr_init(it)); #endif diff --git a/qcsrc/common/weapons/weapon.qh b/qcsrc/common/weapons/weapon.qh index b2ede3c50..54d05d4d1 100644 --- a/qcsrc/common/weapons/weapon.qh +++ b/qcsrc/common/weapons/weapon.qh @@ -158,7 +158,7 @@ CLASS(WeaponPickup, Pickup) { bool b = Item_GiveTo(item, player); if (b) { - LOG_TRACEF("entity %i picked up %s\n", player, this.m_name); + LOG_TRACEF("entity %i picked up %s", player, this.m_name); } return b; } diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index b950a8f03..67463e265 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -378,7 +378,7 @@ METHOD(PortoLaunch, wr_resetplayer, void(entity thiswep, entity actor)) #endif #ifdef CSQC METHOD(PortoLaunch, wr_impacteffect, void(entity this, entity actor)) { - LOG_WARN("Since when does Porto send DamageInfo?\n"); + LOG_WARN("Since when does Porto send DamageInfo?"); } #endif #endif diff --git a/qcsrc/lib/csqcmodel/cl_model.qc b/qcsrc/lib/csqcmodel/cl_model.qc index 789f115d1..6b8609296 100644 --- a/qcsrc/lib/csqcmodel/cl_model.qc +++ b/qcsrc/lib/csqcmodel/cl_model.qc @@ -300,6 +300,6 @@ entity CSQCModel_server2csqc(int i) { if (i < maxclients) return CSQCModel_players[i]; ++i; - LOG_DEBUGF("player out of bounds: %d\n", i); + LOG_DEBUGF("player out of bounds: %d", i); return findfloat(NULL, entnum, i); } diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index 4bea5e36a..4cc8458d5 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -97,7 +97,7 @@ void CSQCPlayer_SetPredictionError(vector o, vector v, float onground_diff) void CSQCPlayer_Unpredict(entity this) { if (csqcplayer_status == CSQCPLAYERSTATUS_UNPREDICTED) return; - if (csqcplayer_status != CSQCPLAYERSTATUS_PREDICTED) LOG_FATALF("Cannot unpredict in current status (%d)\n", csqcplayer_status); + if (csqcplayer_status != CSQCPLAYERSTATUS_PREDICTED) LOG_FATALF("Cannot unpredict in current status (%d)", csqcplayer_status); this.origin = csqcplayer_origin; this.velocity = csqcplayer_velocity; csqcplayer_moveframe = csqcplayer_sequence + 1; // + 1 because the recieved frame has the move already done (server side) diff --git a/qcsrc/lib/i18n.qh b/qcsrc/lib/i18n.qh index c66d7b9a8..8ebedb76f 100644 --- a/qcsrc/lib/i18n.qh +++ b/qcsrc/lib/i18n.qh @@ -49,7 +49,7 @@ string CTX(string s) int p = strstrofs(s, "^", 0); string ret = (p < 0) ? s : substring(s, p + 1, -1); #if CTX_CACHE - LOG_DEBUGF("CTX(\"%s\")\n", s); + LOG_DEBUGF("CTX(\"%s\")", s); HM_sets(CTX_cache, s, ret); #endif return ret; diff --git a/qcsrc/lib/intrusivelist.qh b/qcsrc/lib/intrusivelist.qh index 014f3a169..de445934a 100644 --- a/qcsrc/lib/intrusivelist.qh +++ b/qcsrc/lib/intrusivelist.qh @@ -127,7 +127,7 @@ void IL_REMOVE(IntrusiveList this, entity it) entity otail = this.il_tail; next ? next.(il_prev) = prev : this.il_tail = prev; prev ? prev.(il_next) = next : this.il_head = next; - LOG_DEBUGF("remove %i (%i :: %i), head: %i -> %i, tail: %i -> %i\n", it, it.(il_prev), it.(il_next), ohead, this.il_head, otail, this.il_tail); + LOG_DEBUGF("remove %i (%i :: %i), head: %i -> %i, tail: %i -> %i", it, it.(il_prev), it.(il_next), ohead, this.il_head, otail, this.il_tail); it.(il_next) = it.(il_prev) = NULL; } diff --git a/qcsrc/lib/log.qh b/qcsrc/lib/log.qh index a25dd0f48..aa4f87cb6 100644 --- a/qcsrc/lib/log.qh +++ b/qcsrc/lib/log.qh @@ -33,46 +33,45 @@ #if defined(MENUQC) -string(string...) strcat0n = #53; +string(string, string...) strcat1n = #53; #else -string(string...) strcat0n = #115; +string(string, string...) strcat1n = #115; #endif +// would be nice if __FUNC__ could be concatenated at compile time #define __SOURCELOC__ (sprintf("^7%s^9" "(" "^9"__FILE__"^7" ":" "^9"STR(__LINE__)"^7" ")", __FUNC__)) +#define _LOG_HEADER(level) "^9[::" "^7"PROGNAME"^9" "::" level"^9" "] ", __SOURCELOC__ #define _LOG(f, level, s) \ MACRO_BEGIN { \ - f(sprintf("^9[::" "^7"PROGNAME"^9" "::" level"^9" "] %s\n^7%s\n", __SOURCELOC__, s)); \ + f(strcat1n(_LOG_HEADER(level), "\n^7", s, "\n")); \ } MACRO_END -#define LOG_FATAL(...) _LOG_FATAL(strcat0n(__VA_ARGS__)) +#define LOG_FATAL(...) _LOG_FATAL(strcat1n(__VA_ARGS__)) #define LOG_FATALF(...) _LOG_FATAL(sprintf(__VA_ARGS__)) #define _LOG_FATAL(s) _LOG(error, "^1FATAL", s) -#define LOG_SEVERE(...) _LOG_SEVERE(strcat0n(__VA_ARGS__)) +#define LOG_SEVERE(...) _LOG_SEVERE(strcat1n(__VA_ARGS__)) #define LOG_SEVEREF(...) _LOG_SEVERE(sprintf(__VA_ARGS__)) #define _LOG_SEVERE(s) _LOG(backtrace, "^1SEVERE", s) -#define LOG_WARN(...) _LOG_WARN(strcat0n(__VA_ARGS__)) +#define LOG_WARN(...) _LOG_WARN(strcat1n(__VA_ARGS__)) #define LOG_WARNF(...) _LOG_WARN(sprintf(__VA_ARGS__)) #define _LOG_WARN(s) _LOG(print, "^3WARNING", s) -#define LOG_INFO(...) _LOG_INFO(strcat0n(__VA_ARGS__)) +#define LOG_INFO(...) _LOG_INFO(strcat1n(__VA_ARGS__)) #define LOG_INFOF(...) _LOG_INFO(sprintf(__VA_ARGS__)) #define _LOG_INFO(s) \ MACRO_BEGIN { \ - string ___s = s; \ - if (autocvar_developer) \ - _LOG(print, "^5INFO", ___s); \ - else \ - print(___s); \ + dprint(_LOG_HEADER("^5INFO")); \ + print("\n^7", s); \ } MACRO_END -#define LOG_TRACE(...) _LOG_TRACE(strcat0n(__VA_ARGS__)) +#define LOG_TRACE(...) _LOG_TRACE(strcat1n(__VA_ARGS__)) #define LOG_TRACEF(...) _LOG_TRACE(sprintf(__VA_ARGS__)) #define _LOG_TRACE(s) _LOG(dprint, "^6TRACE", s) -#define LOG_DEBUG(...) _LOG_DEBUG(strcat0n(__VA_ARGS__)) +#define LOG_DEBUG(...) _LOG_DEBUG(strcat1n(__VA_ARGS__)) #define LOG_DEBUGF(...) _LOG_DEBUG(sprintf(__VA_ARGS__)) #define _LOG_DEBUG(s) _LOG(dprint2, "^2DEBUG", s) diff --git a/qcsrc/lib/map.qh b/qcsrc/lib/map.qh index 8a796c02d..55da4d63f 100644 --- a/qcsrc/lib/map.qh +++ b/qcsrc/lib/map.qh @@ -9,7 +9,7 @@ void db_save(int db, string filename) int fh = fopen(filename, FILE_WRITE); if (fh < 0) { - LOG_WARNF("^1Can't write DB to %s\n", filename); + LOG_WARNF("^1Can't write DB to %s", filename); return; } fputs(fh, strcat(ftos(DB_BUCKETS), "\n")); @@ -64,7 +64,7 @@ int db_load(string filename) void db_dump(int db, string filename) { int fh = fopen(filename, FILE_WRITE); - if (fh < 0) LOG_FATALF("Can't dump DB to %s\n"); + if (fh < 0) LOG_FATALF("Can't dump DB to %s"); fputs(fh, "0\n"); for (int i = 0, n = buf_getsize(db); i < n; ++i) { diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index 4c9d9e6e1..106f00998 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -156,7 +156,7 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); } { entity reader = C2S_Protocol_from(C2S); if (reader && reader.m_read && reader.m_read(NULL, sender, true)) continue; - LOG_SEVEREF("Net_ClientCommand() with malformed C2S=%d\n", C2S); + LOG_SEVEREF("Net_ClientCommand() with malformed C2S=%d", C2S); return; } g_buf_i--; diff --git a/qcsrc/lib/random.qc b/qcsrc/lib/random.qc index aff961c55..2287d869d 100644 --- a/qcsrc/lib/random.qc +++ b/qcsrc/lib/random.qc @@ -38,8 +38,7 @@ void DistributeEvenly_Init(float amount, float totalweight) { if (DistributeEvenly_amount) { - LOG_TRACE("DistributeEvenly_Init: UNFINISHED DISTRIBUTION (", ftos(DistributeEvenly_amount), " for "); - LOG_TRACE(ftos(DistributeEvenly_totalweight), " left!)\n"); + LOG_TRACE("DistributeEvenly_Init: UNFINISHED DISTRIBUTION (", ftos(DistributeEvenly_amount), " for ", ftos(DistributeEvenly_totalweight), " left!)"); } if (totalweight == 0) DistributeEvenly_amount = 0; else DistributeEvenly_amount = amount; @@ -97,7 +96,7 @@ float gsl_ran_gaussian(float sigma) prandom_seed = c; #ifdef USE_PRANDOM_DEBUG - LOG_TRACE("RANDOM -> ", ftos(c), "\n"); + LOG_TRACE("RANDOM -> ", ftos(c)); #endif return c / 65536; // in [0..1[ @@ -122,14 +121,14 @@ float gsl_ran_gaussian(float sigma) { prandom_seed = seed; #ifdef USE_PRANDOM_DEBUG - LOG_TRACE("SRANDOM ", ftos(seed), "\n"); + LOG_TRACE("SRANDOM ", ftos(seed)); #endif } #ifdef USE_PRANDOM_DEBUG void prandom_debug() { - LOG_TRACE("Current random seed = ", ftos(prandom_seed), "\n"); + LOG_TRACE("Current random seed = ", ftos(prandom_seed)); } #endif #endif diff --git a/qcsrc/lib/registry.qh b/qcsrc/lib/registry.qh index 5f2f58516..bbe612309 100644 --- a/qcsrc/lib/registry.qh +++ b/qcsrc/lib/registry.qh @@ -160,7 +160,7 @@ void Registry_send(string id, string hash); FOREACH(id, true, s = strcat(s, join, it.registered_id)); \ s = substring(s, strlen(join), -1); \ string h = REGISTRY_HASH(id) = strzone(digest_hex(algo, s)); \ - LOG_DEBUGF(#id ": %s\n[%s]\n", h, s); \ + LOG_DEBUGF(#id ": %s\n[%s]", h, s); \ } \ void Registry_check(string r, string sv) \ { \ @@ -169,7 +169,7 @@ void Registry_send(string id, string hash); string cl = REGISTRY_HASH(id); \ if (cl != sv) \ { \ - LOG_FATALF("client/server mismatch (%s).\nCL: %s\nSV: %s\n", r, cl, sv); \ + LOG_FATALF("client/server mismatch (%s).\nCL: %s\nSV: %s", r, cl, sv); \ } \ } \ } \ diff --git a/qcsrc/lib/spawnfunc.qh b/qcsrc/lib/spawnfunc.qh index 31e20f22f..ae6db507f 100644 --- a/qcsrc/lib/spawnfunc.qh +++ b/qcsrc/lib/spawnfunc.qh @@ -20,7 +20,7 @@ noref bool require_spawnfunc_prefix; #define _spawnfunc_checktypes(fld) \ if (fieldname == #fld) \ - if (!entityfieldassignablefromeditor(i)) LOG_FATALF("Entity field '%s' cannot be whitelisted\n", fieldname); + if (!entityfieldassignablefromeditor(i)) LOG_FATALF("Entity field '%s' cannot be whitelisted", fieldname); #else #define _spawnfunc_checktypes(fld) #endif @@ -62,7 +62,7 @@ noref bool require_spawnfunc_prefix; if (fieldname == "") continue; \ FIELDS_COMMON(_spawnfunc_check) \ whitelist(_spawnfunc_check) \ - LOG_WARNF(_("Entity field %s.%s (%s) is not whitelisted. If you believe this is an error, please file an issue.\n"), #id, fieldname, value); \ + LOG_WARNF(_("Entity field %s.%s (%s) is not whitelisted. If you believe this is an error, please file an issue."), #id, fieldname, value); \ } \ this.spawnfunc_checked = true; \ } \ diff --git a/qcsrc/lib/test.qh b/qcsrc/lib/test.qh index 05bd63d3c..ff6f2d23d 100644 --- a/qcsrc/lib/test.qh +++ b/qcsrc/lib/test.qh @@ -15,7 +15,7 @@ #define SUCCEED() (TEST_ok = true) /** Add a failure, but continue */ -#define ADD_FAILURE(msg) MACRO_BEGIN { ++TEST_failed; LOG_WARNF(msg); } MACRO_END +#define ADD_FAILURE(msg) MACRO_BEGIN { ++TEST_failed; LOG_WARN(msg); } MACRO_END /** Add a failure and return */ #define FAIL(msg) _TEST_ASSERT(ADD_FAILURE(msg)) diff --git a/qcsrc/lib/urllib.qc b/qcsrc/lib/urllib.qc index 8c8bcd16b..d1d5c65ed 100644 --- a/qcsrc/lib/urllib.qc +++ b/qcsrc/lib/urllib.qc @@ -316,7 +316,7 @@ void url_fputs(entity e, string s) else if (e.url_fh == URL_FH_STDOUT) { // stdout - LOG_INFO(s); + print(s); } else { diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 0946414d5..cff5be758 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -112,7 +112,7 @@ float WarpZoneLib_BoxTouchesBrush_Recurse() #ifdef CSQC if (trace_networkentity) { - LOG_TRACE("hit a network ent, cannot continue WarpZoneLib_BoxTouchesBrush\n"); + LOG_TRACE("hit a network ent, cannot continue WarpZoneLib_BoxTouchesBrush"); // we cannot continue, as a player blocks us... // so, abort return 0; @@ -271,7 +271,7 @@ void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end, { if(--i < 1) { - LOG_TRACE("Too many warpzones in sequence, aborting trace.\n"); + LOG_TRACE("Too many warpzones in sequence, aborting trace."); trace_ent = NULL; break; } @@ -299,7 +299,7 @@ void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end, if(trace_ent == wz) { // FIXME can this check be removed? Do we really need it? - LOG_TRACE("I transformed into the same zone again, wtf, aborting the trace\n"); + LOG_TRACE("I transformed into the same zone again, wtf, aborting the trace"); trace_ent = NULL; break; } @@ -395,7 +395,7 @@ void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZo { if(--i < 1) { - LOG_TRACE("Too many warpzones in sequence, aborting trace.\n"); + LOG_TRACE("Too many warpzones in sequence, aborting trace."); trace_ent = NULL; break; } @@ -413,7 +413,7 @@ void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZo if(trace_ent == wz) { // FIXME can this check be removed? Do we really need it? - LOG_TRACE("I transformed into the same zone again, wtf, aborting the trace\n"); + LOG_TRACE("I transformed into the same zone again, wtf, aborting the trace"); trace_ent = NULL; break; } diff --git a/qcsrc/lib/warpzone/server.qc b/qcsrc/lib/warpzone/server.qc index f1bd0e524..de692ee81 100644 --- a/qcsrc/lib/warpzone/server.qc +++ b/qcsrc/lib/warpzone/server.qc @@ -225,7 +225,7 @@ void WarpZone_Touch(entity this, entity toucher) } else { - LOG_TRACE("WARPZONE FAIL AHAHAHAHAH))\n"); + LOG_TRACE("WARPZONE FAIL AHAHAHAHAH))"); } } diff --git a/qcsrc/menu/draw.qc b/qcsrc/menu/draw.qc index b2ce50382..01184a4bf 100644 --- a/qcsrc/menu/draw.qc +++ b/qcsrc/menu/draw.qc @@ -271,7 +271,7 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the void draw_Text(vector theOrigin, string theText, vector theSize, vector theColor, float theAlpha, float ICanHasKallerz) { if(theSize.x <= 0 || theSize.y <= 0) { - LOG_TRACE("Drawing zero size text?\n"); + LOG_TRACE("Drawing zero size text?"); return; } diff --git a/qcsrc/menu/item/label.qc b/qcsrc/menu/item/label.qc index ca9ec00b0..d21b5676b 100644 --- a/qcsrc/menu/item/label.qc +++ b/qcsrc/menu/item/label.qc @@ -38,7 +38,7 @@ { if (!me.overrideRealOrigin_x) me.realOrigin_x = me.keepspaceLeft; if (!me.overrideCondenseFactor) me.condenseFactor = spaceAvail / spaceUsed; - LOG_TRACEF("NOTE: label text %s too wide for label, condensed by factor %f\n", t, me.condenseFactor); + LOG_TRACEF("NOTE: label text %s too wide for label, condensed by factor %f", t, me.condenseFactor); } if (!me.overrideRealOrigin_y) diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index f32b85298..22934ca90 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -237,7 +237,7 @@ void m_keyup(float key, float ascii) if (mouseButtonsPressed < 0) { mouseButtonsPressed = 0; - LOG_TRACE("Warning: released an already released button\n"); + LOG_TRACE("Warning: released an already released button"); } } if (key == K_ALT) menuShiftState &= ~S_ALT; @@ -286,7 +286,7 @@ void m_keydown(float key, float ascii) if (mouseButtonsPressed > 10) { mouseButtonsPressed = 10; - LOG_TRACE("Warning: pressed an already pressed button\n"); + LOG_TRACE("Warning: pressed an already pressed button"); } } if (key == K_ALT) menuShiftState |= S_ALT; diff --git a/qcsrc/menu/skin.qh b/qcsrc/menu/skin.qh index 7cc2d2d3b..4287e24e5 100644 --- a/qcsrc/menu/skin.qh +++ b/qcsrc/menu/skin.qh @@ -19,7 +19,7 @@ //#define SKINSTRING(name,def) case #name: break #define SKINSTRING(name,def) case #name: SKIN##name = strzone(_value); break // I know this leaks memory when skin is read multiple times. Screw it. -#define SKINEND case "": break; case "//": break; default: LOG_TRACE("Invalid key in skin file: ", key, "\n"); } } +#define SKINEND case "": break; case "//": break; default: LOG_TRACE("Invalid key in skin file: ", key); } } #include "skin-customizables.inc" #undef SKINEND #undef SKINSTRING diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 9c0623cfd..c8346fff8 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -212,7 +212,7 @@ int CheckCategoryForEntry(int entry) case "cts": case "xdf": { return CAT_DEFRAG; } - default: { LOG_TRACEF("Found strange mod type: %s\n", modtype); return CAT_MODIFIED; } + default: { LOG_TRACEF("Found strange mod type: %s", modtype); return CAT_MODIFIED; } } } diff --git a/qcsrc/menu/xonotic/slider_resolution.qc b/qcsrc/menu/xonotic/slider_resolution.qc index 1e0a80b76..9a55f8840 100644 --- a/qcsrc/menu/xonotic/slider_resolution.qc +++ b/qcsrc/menu/xonotic/slider_resolution.qc @@ -39,8 +39,8 @@ float updateConwidths(float width, float height, float pixelheight) minfactor = min(1, 640 / c.x); // can be > 1 only if c_x is <640 maxfactor = max(1, r.x / c.x, r.y / c.y); // can be < 1 only if r_x < c_x and r_y < c_y - LOG_TRACE("min factor: ", ftos(minfactor), "\n"); - LOG_TRACE("max factor: ", ftos(maxfactor), "\n"); + LOG_TRACE("min factor: ", ftos(minfactor)); + LOG_TRACE("max factor: ", ftos(maxfactor)); if(sz < 0) f = 1 - (maxfactor - 1) * sz; @@ -149,7 +149,7 @@ void XonoticResolutionSlider_loadResolutions(entity me, float fullscreen) r = getresolution(-1); if(r.x != 0 || r.y != 0) me.addResolution(me, r.x, r.y, r.z); - LOG_TRACE("Added system resolutions.\n"); + LOG_TRACE("Added system resolutions."); } if(me.nValues == 0) @@ -184,9 +184,9 @@ void XonoticResolutionSlider_loadResolutions(entity me, float fullscreen) me.addResolution(me, 1280, 960, 1); // pc res me.addResolution(me, 1280, 1024, 1); // pc res me.addResolution(me, 1920, 1080, 1); // 1080p - LOG_TRACE("Added default resolutions.\n"); + LOG_TRACE("Added default resolutions."); } - LOG_TRACE("Total number of resolutions detected: ", ftos(me.nValues), "\n"); + LOG_TRACE("Total number of resolutions detected: ", ftos(me.nValues)); me.vid_fullscreen = fullscreen; diff --git a/qcsrc/menu/xonotic/statslist.qc b/qcsrc/menu/xonotic/statslist.qc index 7fdbf9c16..3e94738a9 100644 --- a/qcsrc/menu/xonotic/statslist.qc +++ b/qcsrc/menu/xonotic/statslist.qc @@ -51,7 +51,7 @@ string XonoticStatsList_convertDate(string input) void XonoticStatsList_getStats(entity me) { - LOG_TRACE("XonoticStatsList_getStats() at time: ", ftos(time), "\n"); + LOG_TRACE("XonoticStatsList_getStats() at time: ", ftos(time)); // delete the old buffer if it exists if(me.listStats >= 0) buf_del(me.listStats); diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 70d8071f7..d55fa4d6d 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -321,22 +321,22 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data) if(_Nex_ExtResponseSystem_UpdateTo) { - LOG_TRACE("error: UpdateNotification_URI_Get_Callback has been called before\n"); + LOG_TRACE("error: UpdateNotification_URI_Get_Callback has been called before"); return; } if(status != 0) { - LOG_TRACEF("error receiving update notification: status is %d\n", status); + LOG_TRACEF("error receiving update notification: status is %d", status); return; } if(substring(data, 0, 1) == "<") { - LOG_TRACE("error: received HTML instead of an update notification\n"); + LOG_TRACE("error: received HTML instead of an update notification"); return; } if(strstrofs(data, "\r", 0) != -1) { - LOG_TRACE("error: received carriage returns from update notification server\n"); + LOG_TRACE("error: received carriage returns from update notification server"); return; } diff --git a/qcsrc/server-testcase/framework.qc b/qcsrc/server-testcase/framework.qc index 1ec7115ef..1735e1c11 100644 --- a/qcsrc/server-testcase/framework.qc +++ b/qcsrc/server-testcase/framework.qc @@ -7,7 +7,7 @@ float test(); spawnfunc(worldspawn) { float r; - LOG_TRACE("TESTCASE: START\n"); + LOG_TRACE("TESTCASE: START"); r = test(); if(r == 1) error("TESTCASE: PASS"); diff --git a/qcsrc/server/bot/default/aim.qc b/qcsrc/server/bot/default/aim.qc index 7c87db0ff..15dfb0b9b 100644 --- a/qcsrc/server/bot/default/aim.qc +++ b/qcsrc/server/bot/default/aim.qc @@ -343,12 +343,12 @@ bool bot_aim(entity this, float shotspeed, float shotspeedupward, float maxshott shotspeedupward *= W_WeaponSpeedFactor(this); if (!shotspeed) { - LOG_TRACE("bot_aim: WARNING: weapon ", PS(this).m_weapon.m_name, " shotspeed is zero!\n"); + LOG_TRACE("bot_aim: WARNING: weapon ", PS(this).m_weapon.m_name, " shotspeed is zero!"); shotspeed = 1000000; } if (!maxshottime) { - LOG_TRACE("bot_aim: WARNING: weapon ", PS(this).m_weapon.m_name, " maxshottime is zero!\n"); + LOG_TRACE("bot_aim: WARNING: weapon ", PS(this).m_weapon.m_name, " maxshottime is zero!"); maxshottime = 1; } makevectors(this.v_angle); diff --git a/qcsrc/server/bot/default/bot.qc b/qcsrc/server/bot/default/bot.qc index 753c1867e..cab38143d 100644 --- a/qcsrc/server/bot/default/bot.qc +++ b/qcsrc/server/bot/default/bot.qc @@ -370,7 +370,7 @@ void bot_relinkplayerlist() ++currentbots; } }); - LOG_TRACE(strcat("relink: ", ftos(currentbots), " bots seen.\n")); + LOG_TRACE("relink: ", ftos(currentbots), " bots seen."); bot_strategytoken = bot_list; bot_strategytoken_taken = true; } @@ -526,14 +526,14 @@ void autoskill(float factor) LOG_TRACE("best bot got ", ftos(bestbot), "; "); if(bestbot < 0 || bestplayer < 0) { - LOG_TRACE("not doing anything\n"); + LOG_TRACE("not doing anything"); // don't return, let it reset all counters below } else if(bestbot <= bestplayer * factor - 2) { if(autocvar_skill < 17) { - LOG_TRACE("2 frags difference, increasing skill\n"); + LOG_TRACE("2 frags difference, increasing skill"); cvar_set("skill", ftos(autocvar_skill + 1)); bprint("^2SKILL UP!^7 Now at level ", ftos(autocvar_skill), "\n"); } @@ -542,14 +542,14 @@ void autoskill(float factor) { if(autocvar_skill > 0) { - LOG_TRACE("2 frags difference, decreasing skill\n"); + LOG_TRACE("2 frags difference, decreasing skill"); cvar_set("skill", ftos(autocvar_skill - 1)); bprint("^1SKILL DOWN!^7 Now at level ", ftos(autocvar_skill), "\n"); } } else { - LOG_TRACE("not doing anything\n"); + LOG_TRACE("not doing anything"); return; // don't reset counters, wait for them to accumulate } diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 67b558eed..5ccc80a3a 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -520,7 +520,7 @@ void havocbot_movetogoal(entity this) threshold = maxspeed * 0.2; if(vdist(velxy, <, threshold)) { - LOG_TRACE("Warning: ", this.netname, " got stuck on a jumppad (velocity in xy is ", vtos(velxy), "), trying to get out of it now\n"); + LOG_TRACE("Warning: ", this.netname, " got stuck on a jumppad (velocity in xy is ", vtos(velxy), "), trying to get out of it now"); this.aistatus |= AI_STATUS_OUT_JUMPPAD; } return; @@ -771,7 +771,7 @@ void havocbot_movetogoal(entity this) if(tracebox_hits_trigger_hurt(dst_ahead, this.mins, this.maxs, trace_endpos)) { // Remove dangerous dynamic goals from stack - LOG_TRACE("bot ", this.netname, " avoided the goal ", this.goalcurrent.classname, " ", etos(this.goalcurrent), " because it led to a dangerous path; goal stack cleared\n"); + LOG_TRACE("bot ", this.netname, " avoided the goal ", this.goalcurrent.classname, " ", etos(this.goalcurrent), " because it led to a dangerous path; goal stack cleared"); navigation_clearroute(this); return; } @@ -1127,7 +1127,7 @@ float havocbot_moveto(entity this, vector pos) // Step 4: Move to waypoint if(this.havocbot_personal_waypoint==NULL) { - LOG_TRACE("Error: ", this.netname, " trying to walk to a non existent personal waypoint\n"); + LOG_TRACE("Error: ", this.netname, " trying to walk to a non existent personal waypoint"); this.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_GOING; return CMD_STATUS_ERROR; } @@ -1138,7 +1138,7 @@ float havocbot_moveto(entity this, vector pos) bot_strategytoken_taken = true; if(havocbot_moveto_refresh_route(this)) { - LOG_TRACE(this.netname, " walking to its personal waypoint (after ", ftos(this.havocbot_personal_waypoint_failcounter), " failed attempts)\n"); + LOG_TRACE(this.netname, " walking to its personal waypoint (after ", ftos(this.havocbot_personal_waypoint_failcounter), " failed attempts)"); this.havocbot_personal_waypoint_searchtime = time + 10; this.havocbot_personal_waypoint_failcounter = 0; } @@ -1148,13 +1148,13 @@ float havocbot_moveto(entity this, vector pos) this.havocbot_personal_waypoint_searchtime = time + 2; if(this.havocbot_personal_waypoint_failcounter >= 30) { - LOG_TRACE("Warning: can't walk to the personal waypoint located at ", vtos(this.havocbot_personal_waypoint.origin),"\n"); + LOG_TRACE("Warning: can't walk to the personal waypoint located at ", vtos(this.havocbot_personal_waypoint.origin)); this.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_LINKING; delete(this.havocbot_personal_waypoint); return CMD_STATUS_ERROR; } else - LOG_TRACE(this.netname, " can't walk to its personal waypoint (after ", ftos(this.havocbot_personal_waypoint_failcounter), " failed attempts), trying later\n"); + LOG_TRACE(this.netname, " can't walk to its personal waypoint (after ", ftos(this.havocbot_personal_waypoint_failcounter), " failed attempts), trying later"); } } @@ -1172,7 +1172,7 @@ float havocbot_moveto(entity this, vector pos) if(this.aistatus & AI_STATUS_WAYPOINT_PERSONAL_REACHED) { // Step 5: Waypoint reached - LOG_TRACE(this.netname, "'s personal waypoint reached\n"); + LOG_TRACE(this.netname, "'s personal waypoint reached"); delete(this.havocbot_personal_waypoint); this.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_REACHED; return CMD_STATUS_FINISHED; @@ -1187,7 +1187,7 @@ float havocbot_moveto(entity this, vector pos) // Wait until it is linked if(!this.havocbot_personal_waypoint.wplinked) { - LOG_TRACE(this.netname, " waiting for personal waypoint to be linked\n"); + LOG_TRACE(this.netname, " waiting for personal waypoint to be linked"); return CMD_STATUS_EXECUTING; } @@ -1196,7 +1196,7 @@ float havocbot_moveto(entity this, vector pos) this.aistatus |= AI_STATUS_WAYPOINT_PERSONAL_GOING; // Step 3: Route to waypoint - LOG_TRACE(this.netname, " walking to its personal waypoint\n"); + LOG_TRACE(this.netname, " walking to its personal waypoint"); return CMD_STATUS_EXECUTING; } @@ -1205,7 +1205,7 @@ float havocbot_moveto(entity this, vector pos) wp = waypoint_spawnpersonal(this, pos); if(wp==NULL) { - LOG_TRACE("Error: Can't spawn personal waypoint at ",vtos(pos),"\n"); + LOG_TRACE("Error: Can't spawn personal waypoint at ",vtos(pos)); return CMD_STATUS_ERROR; } diff --git a/qcsrc/server/bot/default/havocbot/roles.qc b/qcsrc/server/bot/default/havocbot/roles.qc index fffe6e4b9..771ab282d 100644 --- a/qcsrc/server/bot/default/havocbot/roles.qc +++ b/qcsrc/server/bot/default/havocbot/roles.qc @@ -203,7 +203,7 @@ void havocbot_chooserole_generic(entity this) void havocbot_chooserole(entity this) { - LOG_TRACE("choosing a role...\n"); + LOG_TRACE("choosing a role..."); this.bot_strategytime = 0; if(!MUTATOR_CALLHOOK(HavocBot_ChooseRole, this)) havocbot_chooserole_generic(this); diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 5ab07b1a8..1d18a582e 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -662,7 +662,7 @@ void navigation_routerating(entity this, entity e, float f, float rangebias) { vector pointa, pointb; - LOG_DEBUG("jetpack ai: evaluating path for ", e.classname, "\n"); + LOG_DEBUG("jetpack ai: evaluating path for ", e.classname); // Point A traceline(this.origin, this.origin + '0 0 65535', MOVE_NORMAL, this); @@ -677,7 +677,7 @@ void navigation_routerating(entity this, entity e, float f, float rangebias) if(trace_fraction==1) { - LOG_DEBUG("jetpack ai: can bridge these two points\n"); + LOG_DEBUG("jetpack ai: can bridge these two points"); // Lower the altitude of these points as much as possible float zdistance, xydistance, cost, t, fuel; @@ -714,7 +714,7 @@ void navigation_routerating(entity this, entity e, float f, float rangebias) t += xydistance / autocvar_g_jetpack_maxspeed_side; fuel = t * autocvar_g_jetpack_fuel * 0.8; - LOG_DEBUG(strcat("jetpack ai: required fuel ", ftos(fuel), " this.ammo_fuel ", ftos(this.ammo_fuel), "\n")); + LOG_DEBUG("jetpack ai: required fuel ", ftos(fuel), " this.ammo_fuel ", ftos(this.ammo_fuel)); // enough fuel ? if(this.ammo_fuel>fuel) @@ -732,7 +732,7 @@ void navigation_routerating(entity this, entity e, float f, float rangebias) if (navigation_bestrating < f) { - LOG_DEBUG(strcat("jetpack path: added goal ", e.classname, " (with rating ", ftos(f), ")\n")); + LOG_DEBUG("jetpack path: added goal ", e.classname, " (with rating ", ftos(f), ")"); navigation_bestrating = f; navigation_bestgoal = e; this.navigation_jetpack_goal = e; @@ -778,7 +778,7 @@ void navigation_routerating(entity this, entity e, float f, float rangebias) e.nearestwaypoint = nwp; else { - LOG_DEBUG(strcat("FAILED to find a nearest waypoint to '", e.classname, "' #", etos(e), "\n")); + LOG_DEBUG("FAILED to find a nearest waypoint to '", e.classname, "' #", etos(e)); if(e.flags & FL_ITEM) e.blacklisted = true; @@ -790,7 +790,7 @@ void navigation_routerating(entity this, entity e, float f, float rangebias) if(e.blacklisted) { - LOG_DEBUG(strcat("The entity '", e.classname, "' is going to be excluded from path finding during this match\n")); + LOG_DEBUG("The entity '", e.classname, "' is going to be excluded from path finding during this match"); return; } } @@ -804,17 +804,17 @@ void navigation_routerating(entity this, entity e, float f, float rangebias) nwp = e.nearestwaypoint; } - LOG_DEBUG(strcat("-- checking ", e.classname, " (with cost ", ftos(nwp.wpcost), ")\n")); + LOG_DEBUG("-- checking ", e.classname, " (with cost ", ftos(nwp.wpcost), ")"); if (nwp) if (nwp.wpcost < 10000000) { //te_wizspike(nwp.wpnearestpoint); - LOG_DEBUG(strcat(e.classname, " ", ftos(f), "/(1+", ftos((nwp.wpcost + vlen(e.origin - nwp.wpnearestpoint))), "/", ftos(rangebias), ") = ")); + LOG_DEBUG(e.classname, " ", ftos(f), "/(1+", ftos((nwp.wpcost + vlen(e.origin - nwp.wpnearestpoint))), "/", ftos(rangebias), ") = "); f = f * rangebias / (rangebias + (nwp.wpcost + vlen(o - nwp.wpnearestpoint))); - LOG_DEBUG(strcat("considering ", e.classname, " (with rating ", ftos(f), ")\n")); + LOG_DEBUG("considering ", e.classname, " (with rating ", ftos(f), ")"); if (navigation_bestrating < f) { - LOG_DEBUG(strcat("ground path: added goal ", e.classname, " (with rating ", ftos(f), ")\n")); + LOG_DEBUG("ground path: added goal ", e.classname, " (with rating ", ftos(f), ")"); navigation_bestrating = f; navigation_bestgoal = e; } @@ -897,7 +897,7 @@ void navigation_poptouchedgoals(entity this) if(checkpvs(this.origin + this.view_ofs, this.goalstack01)) if(tracewalk(this, this.origin, this.mins, this.maxs, (this.goalstack01.absmin + this.goalstack01.absmax) * 0.5, bot_navigation_movemode)) { - LOG_DEBUG(strcat("path optimized for ", this.netname, ", removed a goal from the queue\n")); + LOG_DEBUG("path optimized for ", this.netname, ", removed a goal from the queue"); navigation_poproute(this); // TODO this may also be a nice idea to do "early" (e.g. by // manipulating the vlen() comparisons) to shorten paths in @@ -974,7 +974,7 @@ void navigation_goalrating_end(entity this) return; navigation_routetogoal(this, navigation_bestgoal, this.origin); - LOG_DEBUG(strcat("best goal ", this.goalcurrent.classname , "\n")); + LOG_DEBUG("best goal ", this.goalcurrent.classname); // If the bot got stuck then try to reach the farthest waypoint if (!this.navigation_hasgoals) @@ -982,7 +982,7 @@ void navigation_goalrating_end(entity this) { if (!(this.aistatus & AI_STATUS_STUCK)) { - LOG_DEBUG(strcat(this.netname, " cannot walk to any goal\n")); + LOG_DEBUG(this.netname, " cannot walk to any goal"); this.aistatus |= AI_STATUS_STUCK; } @@ -1031,7 +1031,7 @@ void navigation_unstuck(entity this) if (!bot_waypoint_queue_owner) { - LOG_DEBUG(strcat(this.netname, " sutck, taking over the waypoints queue\n")); + LOG_DEBUG(this.netname, " sutck, taking over the waypoints queue"); bot_waypoint_queue_owner = this; bot_waypoint_queue_bestgoal = NULL; bot_waypoint_queue_bestgoalrating = 0; @@ -1044,7 +1044,7 @@ void navigation_unstuck(entity this) { // evaluate the next goal on the queue float d = vlen(this.origin - bot_waypoint_queue_goal.origin); - LOG_DEBUG(strcat(this.netname, " evaluating ", bot_waypoint_queue_goal.classname, " with distance ", ftos(d), "\n")); + LOG_DEBUG(this.netname, " evaluating ", bot_waypoint_queue_goal.classname, " with distance ", ftos(d)); if(tracewalk(bot_waypoint_queue_goal, this.origin, STAT(PL_MIN, NULL), STAT(PL_MAX, NULL), bot_waypoint_queue_goal.origin, bot_navigation_movemode)) { if( d > bot_waypoint_queue_bestgoalrating) @@ -1059,14 +1059,14 @@ void navigation_unstuck(entity this) { if (bot_waypoint_queue_bestgoal) { - LOG_DEBUG(strcat(this.netname, " stuck, reachable waypoint found, heading to it\n")); + LOG_DEBUG(this.netname, " stuck, reachable waypoint found, heading to it"); navigation_routetogoal(this, bot_waypoint_queue_bestgoal, this.origin); this.bot_strategytime = time + autocvar_bot_ai_strategyinterval; this.aistatus &= ~AI_STATUS_STUCK; } else { - LOG_DEBUG(strcat(this.netname, " stuck, cannot walk to any waypoint at all\n")); + LOG_DEBUG(this.netname, " stuck, cannot walk to any waypoint at all"); } bot_waypoint_queue_owner = NULL; @@ -1078,7 +1078,7 @@ void navigation_unstuck(entity this) return; // build a new queue - LOG_DEBUG(strcat(this.netname, " stuck, scanning reachable waypoints within ", ftos(search_radius)," qu\n")); + LOG_DEBUG(this.netname, " stuck, scanning reachable waypoints within ", ftos(search_radius)," qu"); entity first = NULL; @@ -1097,7 +1097,7 @@ void navigation_unstuck(entity this) bot_waypoint_queue_goal = first; else { - LOG_DEBUG(strcat(this.netname, " stuck, cannot walk to any waypoint at all\n")); + LOG_DEBUG(this.netname, " stuck, cannot walk to any waypoint at all"); bot_waypoint_queue_owner = NULL; } } diff --git a/qcsrc/server/bot/default/scripting.qc b/qcsrc/server/bot/default/scripting.qc index 8b2f9e6d1..ffb7e5813 100644 --- a/qcsrc/server/bot/default/scripting.qc +++ b/qcsrc/server/bot/default/scripting.qc @@ -20,7 +20,7 @@ void bot_clearqueue(entity bot) return; buf_del(bot.bot_cmdqueuebuf); bot.bot_cmdqueuebuf_allocated = false; - LOG_TRACE("bot ", bot.netname, " queue cleared\n"); + LOG_TRACE("bot ", bot.netname, " queue cleared"); } void bot_queuecommand(entity bot, string cmdstring) diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index 84995d1c7..8475640ac 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -44,7 +44,7 @@ entity waypoint_spawn(vector m1, vector m2, float f) { if(!(f & WAYPOINTFLAG_GENERATED)) { - LOG_TRACE("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)); delete(w); return NULL; } @@ -378,7 +378,7 @@ float waypoint_load_links() { LOG_TRACE("waypoint links load from "); LOG_TRACE(filename); - LOG_TRACE(" failed\n"); + LOG_TRACE(" failed"); return false; } @@ -414,7 +414,7 @@ float waypoint_load_links() if(!found) { - LOG_TRACE("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)); continue; } @@ -436,7 +436,7 @@ float waypoint_load_links() if(!found) { - LOG_TRACE("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)); continue; } @@ -446,7 +446,7 @@ float waypoint_load_links() fclose(file); - LOG_TRACE("loaded ", ftos(c), " waypoint links from maps/", mapname, ".waypoints.cache\n"); + LOG_TRACE("loaded ", ftos(c), " waypoint links from maps/", mapname, ".waypoints.cache"); botframe_cachedwaypointlinks = true; return true; @@ -466,7 +466,7 @@ void waypoint_load_links_hardwired() if (file < 0) { - LOG_TRACE("waypoint links load from ", filename, " failed\n"); + LOG_TRACE("waypoint links load from ", filename, " failed"); return; } @@ -537,7 +537,7 @@ void waypoint_load_links_hardwired() fclose(file); - LOG_TRACE("loaded ", ftos(c), " waypoint links from maps/", mapname, ".waypoints.hardwired\n"); + LOG_TRACE("loaded ", ftos(c), " waypoint links from maps/", mapname, ".waypoints.hardwired"); } entity waypoint_get_link(entity w, float i) @@ -681,11 +681,11 @@ float waypoint_loadall() cwb = cwb + 1; } fclose(file); - LOG_TRACE("loaded ", ftos(cwp), " waypoints and ", ftos(cwb), " wayboxes from maps/", mapname, ".waypoints\n"); + LOG_TRACE("loaded ", ftos(cwp), " waypoints and ", ftos(cwb), " wayboxes from maps/", mapname, ".waypoints"); } else { - LOG_TRACE("waypoint load from ", filename, " failed\n"); + LOG_TRACE("waypoint load from ", filename, " failed"); } return cwp + cwb; } diff --git a/qcsrc/server/campaign.qc b/qcsrc/server/campaign.qc index 163337e03..5097bd8a1 100644 --- a/qcsrc/server/campaign.qc +++ b/qcsrc/server/campaign.qc @@ -260,7 +260,7 @@ void CampaignPostIntermission() if(campaign_won && campaign_entries < 2) { // last map won! - LOG_DEBUG("^2test run: campaign looks GOOD\n"); + LOG_DEBUG("^2test run: campaign looks GOOD"); localcmd("togglemenu 1\n"); CampaignFile_Unload(); return; diff --git a/qcsrc/server/command/radarmap.qc b/qcsrc/server/command/radarmap.qc index 998de24cb..71f5e270b 100644 --- a/qcsrc/server/command/radarmap.qc +++ b/qcsrc/server/command/radarmap.qc @@ -45,7 +45,7 @@ float FullTraceFraction(vector a, vector mi, vector ma, vector b) c = trace_endpos; } - if (n > 200) LOG_TRACE("HOLY SHIT! FullTraceFraction: ", ftos(n), " total traces, ", ftos(m), " iterations\n"); + if (n > 200) LOG_TRACE("HOLY SHIT! FullTraceFraction: ", ftos(n), " total traces, ", ftos(m), " iterations"); return white / (black + white); } diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index 9440a3673..bb59566d2 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -139,7 +139,7 @@ void GameCommand_adminmsg(float request, float argc) } successful = strcat(successful, (successful ? ", " : ""), client.netname); - LOG_TRACE("Message sent to ", client.netname, "\n"); + LOG_TRACE("Message sent to ", client.netname); continue; } diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index c16b3d495..e8e50c718 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -141,10 +141,10 @@ float tracebox_inverted (vector v1, vector mi, vector ma, vector v2, float nomon if(c == 50) { - LOG_TRACE("HOLY SHIT! When tracing from ", vtos(v1), " to ", vtos(v2), "\n"); - LOG_TRACE(" Nudging gets us nowhere at ", vtos(pos), "\n"); - LOG_TRACE(" trace_endpos is ", vtos(trace_endpos), "\n"); - LOG_TRACE(" trace distance is ", ftos(vlen(pos - trace_endpos)), "\n"); + LOG_TRACE("HOLY SHIT! When tracing from ", vtos(v1), " to ", vtos(v2)); + LOG_TRACE(" Nudging gets us nowhere at ", vtos(pos)); + LOG_TRACE(" trace_endpos is ", vtos(trace_endpos)); + LOG_TRACE(" trace distance is ", ftos(vlen(pos - trace_endpos))); } stopentity = trace_ent; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index c0f592992..27fe5c1ef 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -966,10 +966,10 @@ float MapHasRightSize(string map) LOG_TRACE("checkwp "); LOG_TRACE(map); if(!fexists(strcat("maps/", map, ".waypoints"))) { - LOG_TRACE(": no waypoints\n"); + LOG_TRACE(": no waypoints"); return false; } - LOG_TRACE(": has waypoints\n"); + LOG_TRACE(": has waypoints"); } // open map size restriction file @@ -984,18 +984,18 @@ float MapHasRightSize(string map) fclose(fh); if(player_count < mapmin) { - LOG_TRACE("not enough\n"); + LOG_TRACE("not enough"); return false; } if(player_count > mapmax) { - LOG_TRACE("too many\n"); + LOG_TRACE("too many"); return false; } - LOG_TRACE("right size\n"); + LOG_TRACE("right size"); return true; } - LOG_TRACE(": not found\n"); + LOG_TRACE(": not found"); return true; } @@ -1034,7 +1034,7 @@ float Map_Check(float position, float pass) return 0; } else - LOG_DEBUG( "Couldn't select '", filename, "'...\n" ); + LOG_DEBUG( "Couldn't select '", filename, "'..." ); return 0; } @@ -1067,7 +1067,7 @@ float() MaplistMethod_Iterate = // usual method { float pass, i; - LOG_TRACE("Trying MaplistMethod_Iterate\n"); + LOG_TRACE("Trying MaplistMethod_Iterate"); for(pass = 1; pass <= 2; ++pass) { @@ -1084,7 +1084,7 @@ float() MaplistMethod_Iterate = // usual method float() MaplistMethod_Repeat = // fallback method { - LOG_TRACE("Trying MaplistMethod_Repeat\n"); + LOG_TRACE("Trying MaplistMethod_Repeat"); if(Map_Check(Map_Current, 2)) return Map_Current; @@ -1095,7 +1095,7 @@ float() MaplistMethod_Random = // random map selection { float i, imax; - LOG_TRACE("Trying MaplistMethod_Random\n"); + LOG_TRACE("Trying MaplistMethod_Random"); imax = 42; @@ -1115,7 +1115,7 @@ float(float exponent) MaplistMethod_Shuffle = // more clever shuffling { float i, j, imax, insertpos; - LOG_TRACE("Trying MaplistMethod_Shuffle\n"); + LOG_TRACE("Trying MaplistMethod_Shuffle"); imax = 42; @@ -1127,7 +1127,7 @@ float(float exponent) MaplistMethod_Shuffle = // more clever shuffling insertpos = pow(random(), 1 / exponent); // ]0, 1] insertpos = insertpos * (Map_Count - 1); // ]0, Map_Count - 1] insertpos = ceil(insertpos) + 1; // {2, 3, 4, ..., Map_Count} - LOG_TRACE("SHUFFLE: insert pos = ", ftos(insertpos), "\n"); + LOG_TRACE("SHUFFLE: insert pos = ", ftos(insertpos)); // insert the current map there newlist = ""; @@ -2133,7 +2133,7 @@ void Shutdown() if(world_initialized > 0) { world_initialized = 0; - LOG_TRACE("Saving persistent data...\n"); + LOG_TRACE("Saving persistent data..."); Ban_SaveBans(); // playerstats with unfinished match @@ -2156,7 +2156,7 @@ void Shutdown() CheatShutdown(); // must be after cheatcount check db_close(ServerProgsDB); db_close(TemporaryDB); - LOG_TRACE("Saving persistent data... done!\n"); + LOG_TRACE("Saving persistent data... done!"); // tell the bot system the game is ending now bot_endgame(); diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index 78f7497ac..50c258f92 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -163,7 +163,7 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data) LOG_TRACE("received ban list item ", ftos(i / 4), ": ip=", ip); LOG_TRACE(" timeleft=", ftos(timeleft), " reason=", reason); - LOG_TRACE(" serverip=", serverip, "\n"); + LOG_TRACE(" serverip=", serverip); timeleft -= 1.5 * autocvar_g_ban_sync_timeout; if(timeleft < 0) @@ -507,10 +507,10 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync) if(time + bantime > ban_expire[i]) { ban_expire[i] = time + bantime; - LOG_TRACE(ip, "'s ban has been prolonged to ", ftos(bantime), " seconds from now\n"); + LOG_TRACE(ip, "'s ban has been prolonged to ", ftos(bantime), " seconds from now"); } else - LOG_TRACE(ip, "'s ban is still active until ", ftos(ban_expire[i] - time), " seconds from now\n"); + LOG_TRACE(ip, "'s ban is still active until ", ftos(ban_expire[i] - time), " seconds from now"); // and enforce reason = Ban_Enforce(i, reason); @@ -552,7 +552,7 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync) } // okay, insert our new victim as i Ban_Delete(i); - LOG_TRACE(ip, " has been banned for ", ftos(bantime), " seconds\n"); + LOG_TRACE(ip, " has been banned for ", ftos(bantime), " seconds"); ban_expire[i] = time + bantime; ban_ip[i] = strzone(ip); ban_count = max(ban_count, i + 1); diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index deb2b2961..fb782ed5c 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -172,7 +172,7 @@ entity findnearest(vector point, .string field, string value, vector axismod) { LOG_TRACE("Nearest point ("); LOG_TRACE(nearest_entity[0].netname); - LOG_TRACE(") is not visible, using a visible one.\n"); + LOG_TRACE(") is not visible, using a visible one."); } return nearest_entity[i]; } @@ -181,7 +181,7 @@ entity findnearest(vector point, .string field, string value, vector axismod) if (num_nearest == 0) return NULL; - LOG_TRACE("Not seeing any location point, using nearest as fallback.\n"); + LOG_TRACE("Not seeing any location point, using nearest as fallback."); /* DEBUGGING CODE: dprint("Candidates were: "); for(j = 0; j < num_nearest; ++j) @@ -1049,11 +1049,11 @@ bool SUB_NoImpactCheck(entity this, entity toucher) traceline(this.origin - tic, this.origin + tic, MOVE_NORMAL, this); if (trace_fraction >= 1) { - LOG_TRACE("Odd... did not hit...?\n"); + LOG_TRACE("Odd... did not hit...?"); } else if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) { - LOG_TRACE("Detected and prevented the sky-grapple bug.\n"); + LOG_TRACE("Detected and prevented the sky-grapple bug."); return true; } } @@ -1244,7 +1244,7 @@ float MoveToRandomLocationWithinBounds(entity e, vector boundmin, vector boundma { setorigin(e, start); e.angles = vectoangles(end - start); - LOG_TRACE("Needed ", ftos(i + 1), " attempts\n"); + LOG_TRACE("Needed ", ftos(i + 1), " attempts"); return true; } else diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index c1f798af6..9b16e4e96 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -720,7 +720,7 @@ void ctf_Handle_Pickup(entity flag, entity player, int pickuptype) { pickup_dropped_score = (autocvar_g_ctf_flag_return_time ? bound(0, ((flag.ctf_droptime + autocvar_g_ctf_flag_return_time) - time) / autocvar_g_ctf_flag_return_time, 1) : 1); pickup_dropped_score = floor((autocvar_g_ctf_score_pickup_dropped_late * (1 - pickup_dropped_score) + autocvar_g_ctf_score_pickup_dropped_early * pickup_dropped_score) + 0.5); - LOG_TRACE("pickup_dropped_score is ", ftos(pickup_dropped_score), "\n"); + LOG_TRACE("pickup_dropped_score is ", ftos(pickup_dropped_score)); PlayerTeamScore_AddScore(player, pickup_dropped_score); ctf_EventLog("pickup", flag.team, player); break; @@ -893,7 +893,7 @@ void ctf_FlagThink(entity this) // sanity checks if(this.mins != CTF_FLAG.m_mins || this.maxs != CTF_FLAG.m_maxs) { // reset the flag boundaries in case it got squished - LOG_TRACE("wtf the flag got squashed?\n"); + LOG_TRACE("wtf the flag got squashed?"); tracebox(this.origin, CTF_FLAG.m_mins, CTF_FLAG.m_maxs, this.origin, MOVE_NOMONSTERS, this); if(!trace_startsolid || this.noalign) // can we resize it without getting stuck? setsize(this, CTF_FLAG.m_mins, CTF_FLAG.m_maxs); } @@ -1019,7 +1019,7 @@ void ctf_FlagThink(entity this) default: // this should never happen { - LOG_TRACE("ctf_FlagThink(): Flag exists with no status?\n"); + LOG_TRACE("ctf_FlagThink(): Flag exists with no status?"); return; } } @@ -1107,7 +1107,7 @@ METHOD(Flag, giveTo, bool(Flag this, entity flag, entity toucher)) case FLAG_CARRY: { - LOG_TRACE("Someone touched a flag even though it was being carried?\n"); + LOG_TRACE("Someone touched a flag even though it was being carried?"); break; } @@ -1961,47 +1961,47 @@ void havocbot_role_ctf_defense(entity this) void havocbot_role_ctf_setrole(entity bot, int role) { - LOG_TRACE(strcat(bot.netname," switched to ")); + string s = "(null)"; switch(role) { case HAVOCBOT_CTF_ROLE_CARRIER: - LOG_TRACE("carrier"); + s = "carrier"; bot.havocbot_role = havocbot_role_ctf_carrier; bot.havocbot_role_timeout = 0; bot.havocbot_cantfindflag = time + 10; bot.bot_strategytime = 0; break; case HAVOCBOT_CTF_ROLE_DEFENSE: - LOG_TRACE("defense"); + s = "defense"; bot.havocbot_role = havocbot_role_ctf_defense; bot.havocbot_role_timeout = 0; break; case HAVOCBOT_CTF_ROLE_MIDDLE: - LOG_TRACE("middle"); + s = "middle"; bot.havocbot_role = havocbot_role_ctf_middle; bot.havocbot_role_timeout = 0; break; case HAVOCBOT_CTF_ROLE_OFFENSE: - LOG_TRACE("offense"); + s = "offense"; bot.havocbot_role = havocbot_role_ctf_offense; bot.havocbot_role_timeout = 0; break; case HAVOCBOT_CTF_ROLE_RETRIEVER: - LOG_TRACE("retriever"); + s = "retriever"; bot.havocbot_previous_role = bot.havocbot_role; bot.havocbot_role = havocbot_role_ctf_retriever; bot.havocbot_role_timeout = time + 10; bot.bot_strategytime = 0; break; case HAVOCBOT_CTF_ROLE_ESCORT: - LOG_TRACE("escort"); + s = "escort"; bot.havocbot_previous_role = bot.havocbot_role; bot.havocbot_role = havocbot_role_ctf_escort; bot.havocbot_role_timeout = time + 30; bot.bot_strategytime = 0; break; } - LOG_TRACE("\n"); + LOG_TRACE(bot.netname, " switched to ", s); } @@ -2634,7 +2634,7 @@ void ctf_DelayedInit(entity this) // Do this check with a delay so we can wait f // if no teams are found, spawn defaults if(find(NULL, classname, "ctf_team") == NULL) { - LOG_TRACE("No \"ctf_team\" entities found on this map, creating them anyway.\n"); + LOG_TRACE("No \"ctf_team\" entities found on this map, creating them anyway."); if(ctf_teams & BIT(0)) ctf_SpawnTeam("Red", NUM_TEAM_1); if(ctf_teams & BIT(1)) diff --git a/qcsrc/server/mutators/mutator/gamemode_domination.qc b/qcsrc/server/mutators/mutator/gamemode_domination.qc index 16fa08c81..7c1e81184 100644 --- a/qcsrc/server/mutators/mutator/gamemode_domination.qc +++ b/qcsrc/server/mutators/mutator/gamemode_domination.qc @@ -675,7 +675,7 @@ void dom_DelayedInit(entity this) // Do this check with a delay so we can wait f // if no teams are found, spawn defaults if(find(NULL, classname, "dom_team") == NULL || autocvar_g_domination_teams_override >= 2) { - LOG_TRACE("No \"dom_team\" entities found on this map, creating them anyway.\n"); + LOG_TRACE("No \"dom_team\" entities found on this map, creating them anyway."); domination_teams = bound(2, ((autocvar_g_domination_teams_override < 2) ? autocvar_g_domination_default_teams : autocvar_g_domination_teams_override), 4); dom_spawnteams(domination_teams); } diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc index c64118cd6..a875e19ab 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -304,7 +304,7 @@ void havocbot_role_ft_offense(entity this) // If only one left on team or if role has timed out then start trying to free players. if (((unfrozen == 0) && (!STAT(FROZEN, this))) || (time > this.havocbot_role_timeout)) { - LOG_TRACE("changing role to freeing\n"); + LOG_TRACE("changing role to freeing"); this.havocbot_role = havocbot_role_ft_freeing; this.havocbot_role_timeout = 0; return; @@ -333,7 +333,7 @@ void havocbot_role_ft_freeing(entity this) if (time > this.havocbot_role_timeout) { - LOG_TRACE("changing role to offense\n"); + LOG_TRACE("changing role to offense"); this.havocbot_role = havocbot_role_ft_offense; this.havocbot_role_timeout = 0; return; diff --git a/qcsrc/server/mutators/mutator/gamemode_invasion.qc b/qcsrc/server/mutators/mutator/gamemode_invasion.qc index 28d369d5b..184cf3330 100644 --- a/qcsrc/server/mutators/mutator/gamemode_invasion.qc +++ b/qcsrc/server/mutators/mutator/gamemode_invasion.qc @@ -131,7 +131,7 @@ void invasion_SpawnChosenMonster(float mon) if(spawn_point == NULL) { - LOG_TRACE("Warning: couldn't find any invasion_spawnpoint spawnpoints, attempting to spawn monsters in random locations\n"); + LOG_TRACE("Warning: couldn't find any invasion_spawnpoint spawnpoints, attempting to spawn monsters in random locations"); entity e = spawn(); setsize(e, (get_monsterinfo(mon)).mins, (get_monsterinfo(mon)).maxs); diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index c3acf86e6..5f6b5226d 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -1139,7 +1139,7 @@ void havocbot_role_kh_carrier(entity this) if (!(this.kh_next)) { - LOG_TRACE("changing role to freelancer\n"); + LOG_TRACE("changing role to freelancer"); this.havocbot_role = havocbot_role_kh_freelancer; this.havocbot_role_timeout = 0; return; @@ -1166,7 +1166,7 @@ void havocbot_role_kh_defense(entity this) if (this.kh_next) { - LOG_TRACE("changing role to carrier\n"); + LOG_TRACE("changing role to carrier"); this.havocbot_role = havocbot_role_kh_carrier; this.havocbot_role_timeout = 0; return; @@ -1176,7 +1176,7 @@ void havocbot_role_kh_defense(entity this) this.havocbot_role_timeout = time + random() * 10 + 20; if (time > this.havocbot_role_timeout) { - LOG_TRACE("changing role to freelancer\n"); + LOG_TRACE("changing role to freelancer"); this.havocbot_role = havocbot_role_kh_freelancer; this.havocbot_role_timeout = 0; return; @@ -1207,7 +1207,7 @@ void havocbot_role_kh_offense(entity this) if (this.kh_next) { - LOG_TRACE("changing role to carrier\n"); + LOG_TRACE("changing role to carrier"); this.havocbot_role = havocbot_role_kh_carrier; this.havocbot_role_timeout = 0; return; @@ -1217,7 +1217,7 @@ void havocbot_role_kh_offense(entity this) this.havocbot_role_timeout = time + random() * 10 + 20; if (time > this.havocbot_role_timeout) { - LOG_TRACE("changing role to freelancer\n"); + LOG_TRACE("changing role to freelancer"); this.havocbot_role = havocbot_role_kh_freelancer; this.havocbot_role_timeout = 0; return; @@ -1249,7 +1249,7 @@ void havocbot_role_kh_freelancer(entity this) if (this.kh_next) { - LOG_TRACE("changing role to carrier\n"); + LOG_TRACE("changing role to carrier"); this.havocbot_role = havocbot_role_kh_carrier; this.havocbot_role_timeout = 0; return; @@ -1261,12 +1261,12 @@ void havocbot_role_kh_freelancer(entity this) { if (random() < 0.5) { - LOG_TRACE("changing role to offense\n"); + LOG_TRACE("changing role to offense"); this.havocbot_role = havocbot_role_kh_offense; } else { - LOG_TRACE("changing role to defense\n"); + LOG_TRACE("changing role to defense"); this.havocbot_role = havocbot_role_kh_defense; } this.havocbot_role_timeout = 0; diff --git a/qcsrc/server/mutators/mutator/gamemode_lms.qc b/qcsrc/server/mutators/mutator/gamemode_lms.qc index e96e7f2f9..afd107bc4 100644 --- a/qcsrc/server/mutators/mutator/gamemode_lms.qc +++ b/qcsrc/server/mutators/mutator/gamemode_lms.qc @@ -128,7 +128,7 @@ int WinningCondition_LMS() { // SNAFU (maybe a draw game?) ClearWinners(); - LOG_TRACE("No players, ending game.\n"); + LOG_TRACE("No players, ending game."); return WINNING_YES; } } diff --git a/qcsrc/server/mutators/mutator/gamemode_tdm.qc b/qcsrc/server/mutators/mutator/gamemode_tdm.qc index 3bc522ded..8fdfc8343 100644 --- a/qcsrc/server/mutators/mutator/gamemode_tdm.qc +++ b/qcsrc/server/mutators/mutator/gamemode_tdm.qc @@ -73,7 +73,7 @@ void tdm_DelayedInit(entity this) // if no teams are found, spawn defaults if(find(NULL, classname, "tdm_team") == NULL) { - LOG_TRACE("No \"tdm_team\" entities found on this map, creating them anyway.\n"); + LOG_TRACE("No \"tdm_team\" entities found on this map, creating them anyway."); int numteams = autocvar_g_tdm_teams_override; diff --git a/qcsrc/server/pathlib/main.qc b/qcsrc/server/pathlib/main.qc index b07d86384..abf7f7152 100644 --- a/qcsrc/server/pathlib/main.qc +++ b/qcsrc/server/pathlib/main.qc @@ -75,7 +75,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go if(inwater(parent.origin)) { - LOG_TRACE("FromWater\n"); + LOG_TRACE("FromWater"); pathlib_expandnode = pathlib_expandnode_box; pathlib_movenode = pathlib_swimnode; } @@ -83,13 +83,13 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go { if(inwater(to)) { - LOG_TRACE("ToWater\n"); + LOG_TRACE("ToWater"); pathlib_expandnode = pathlib_expandnode_box; pathlib_movenode = pathlib_walknode; } else { - LOG_TRACE("LandToLoand\n"); + LOG_TRACE("LandToLoand"); //if(edge_check(parent.origin)) // return 0; @@ -102,7 +102,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go node = pathlib_nodeatpoint(to); if(node) { - LOG_TRACE("NodeAtPoint\n"); + LOG_TRACE("NodeAtPoint"); ++pathlib_merge_cnt; if(node.owner == openlist) @@ -135,7 +135,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go { //pathlib_showsquare(where, 0 ,30); //pathlib_showsquare(parent.origin, 1 ,30); - LOG_TRACE("pathlib_movenode_goodnode = 0\n"); + LOG_TRACE("pathlib_movenode_goodnode = 0"); return 0; } @@ -143,9 +143,9 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go if(pathlib_nodeatpoint(where)) { - LOG_TRACE("NAP WHERE :",vtos(where),"\n"); - LOG_TRACE("not NAP TO:",vtos(to),"\n"); - LOG_TRACE("NAP-NNAP:",ftos(vlen(to-where)),"\n\n"); + LOG_TRACE("NAP WHERE :",vtos(where)); + LOG_TRACE("not NAP TO:",vtos(to)); + LOG_TRACE("NAP-NNAP:",ftos(vlen(to-where))); return 0; } @@ -153,7 +153,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go if(doedge) if (!tile_check(parent, where)) { - LOG_TRACE("tile_check fail\n"); + LOG_TRACE("tile_check fail"); #if DEBUGPATHING pathlib_showsquare(where, 0 ,30); #endif @@ -239,7 +239,7 @@ void pathlib_close_node(entity node,vector goal) if(node.owner == closedlist) { - LOG_TRACE("Pathlib: Tried to close a closed node!\n"); + LOG_TRACE("Pathlib: Tried to close a closed node!"); return; } @@ -455,12 +455,12 @@ entity pathlib_astar(entity this, vector from,vector to) to.y = fsnap(to.y, pathlib_gridsize); //to_z += 32; - LOG_TRACE("AStar init\n"); + LOG_TRACE("AStar init"); path = pathlib_mknode(from, NULL); pathlib_close_node(path, to); if(pathlib_foundgoal) { - LOG_TRACE("AStar: Goal found on first node!\n"); + LOG_TRACE("AStar: Goal found on first node!"); open = new(path_end); open.owner = open; @@ -473,7 +473,7 @@ entity pathlib_astar(entity this, vector from,vector to) if(pathlib_expandnode(path, from, to) <= 0) { - LOG_TRACE("AStar path fail.\n"); + LOG_TRACE("AStar path fail."); pathlib_cleanup(); return NULL; @@ -491,11 +491,11 @@ entity pathlib_astar(entity this, vector from,vector to) { if((gettime(GETTIME_REALTIME) - pathlib_starttime) > pathlib_maxtime) { - LOG_TRACE("Path took to long to compute!\n"); - LOG_TRACE("Nodes - created: ", ftos(pathlib_made_cnt),"\n"); - LOG_TRACE("Nodes - open: ", ftos(pathlib_open_cnt),"\n"); - LOG_TRACE("Nodes - merged: ", ftos(pathlib_merge_cnt),"\n"); - LOG_TRACE("Nodes - closed: ", ftos(pathlib_closed_cnt),"\n"); + LOG_TRACE("Path took to long to compute!"); + LOG_TRACE("Nodes - created: ", ftos(pathlib_made_cnt)); + LOG_TRACE("Nodes - open: ", ftos(pathlib_open_cnt)); + LOG_TRACE("Nodes - merged: ", ftos(pathlib_merge_cnt)); + LOG_TRACE("Nodes - closed: ", ftos(pathlib_closed_cnt)); pathlib_cleanup(); return NULL; @@ -512,7 +512,7 @@ entity pathlib_astar(entity this, vector from,vector to) if(pathlib_foundgoal) { - LOG_TRACE("Target found. Rebuilding and filtering path...\n"); + LOG_TRACE("Target found. Rebuilding and filtering path..."); ftime = gettime(GETTIME_REALTIME); ptime = ftime - ptime; @@ -539,26 +539,26 @@ entity pathlib_astar(entity this, vector from,vector to) #if DEBUGPATHING pathlib_showpath2(start); - LOG_TRACE("Time used - pathfinding: ", ftos(ptime),"\n"); - LOG_TRACE("Time used - rebuild & filter: ", ftos(ftime),"\n"); - LOG_TRACE("Time used - cleanup: ", ftos(ctime),"\n"); - LOG_TRACE("Time used - total: ", ftos(ptime + ftime + ctime),"\n"); - LOG_TRACE("Time used - # frames: ", ftos(ceil((ptime + ftime + ctime) / sys_frametime)),"\n\n"); - LOG_TRACE("Nodes - created: ", ftos(pathlib_made_cnt),"\n"); - LOG_TRACE("Nodes - open: ", ftos(pathlib_open_cnt),"\n"); - LOG_TRACE("Nodes - merged: ", ftos(pathlib_merge_cnt),"\n"); - LOG_TRACE("Nodes - closed: ", ftos(pathlib_closed_cnt),"\n"); - LOG_TRACE("Nodes - searched: ", ftos(pathlib_searched_cnt),"\n"); - LOG_TRACE("Nodes bestopen searched: ", ftos(pathlib_bestopen_searched),"\n"); - LOG_TRACE("Nodes bestcash - hits: ", ftos(pathlib_bestcash_hits),"\n"); - LOG_TRACE("Nodes bestcash - save: ", ftos(pathlib_bestcash_saved),"\n"); - LOG_TRACE("AStar done.\n"); + LOG_TRACE("Time used - pathfinding: ", ftos(ptime)); + LOG_TRACE("Time used - rebuild & filter: ", ftos(ftime)); + LOG_TRACE("Time used - cleanup: ", ftos(ctime)); + LOG_TRACE("Time used - total: ", ftos(ptime + ftime + ctime)); + LOG_TRACE("Time used - # frames: ", ftos(ceil((ptime + ftime + ctime) / sys_frametime))); + LOG_TRACE("Nodes - created: ", ftos(pathlib_made_cnt)); + LOG_TRACE("Nodes - open: ", ftos(pathlib_open_cnt)); + LOG_TRACE("Nodes - merged: ", ftos(pathlib_merge_cnt)); + LOG_TRACE("Nodes - closed: ", ftos(pathlib_closed_cnt)); + LOG_TRACE("Nodes - searched: ", ftos(pathlib_searched_cnt)); + LOG_TRACE("Nodes bestopen searched: ", ftos(pathlib_bestopen_searched)); + LOG_TRACE("Nodes bestcash - hits: ", ftos(pathlib_bestcash_hits)); + LOG_TRACE("Nodes bestcash - save: ", ftos(pathlib_bestcash_saved)); + LOG_TRACE("AStar done."); #endif return start; } } - LOG_TRACE("A* Faild to find a path! Try a smaller gridsize.\n"); + LOG_TRACE("A* Faild to find a path! Try a smaller gridsize."); pathlib_cleanup(); diff --git a/qcsrc/server/pathlib/movenode.qc b/qcsrc/server/pathlib/movenode.qc index fea57426e..4a3bfe35c 100644 --- a/qcsrc/server/pathlib/movenode.qc +++ b/qcsrc/server/pathlib/movenode.qc @@ -87,7 +87,7 @@ vector pathlib_walknode(entity this, vector start, vector end, float doedge) vector direction,point,last_point,s,e; float steps, distance, i; - LOG_TRACE("Walking node from ", vtos(start), " to ", vtos(end), "\n"); + LOG_TRACE("Walking node from ", vtos(start), " to ", vtos(end)); pathlib_movenode_goodnode = 0; @@ -109,7 +109,7 @@ vector pathlib_walknode(entity this, vector start, vector end, float doedge) //start - movenode_maxdrop a.cnt = time + 10; - LOG_TRACE("I cant walk on air!\n"); + LOG_TRACE("I cant walk on air!"); return trace_endpos; } diff --git a/qcsrc/server/pathlib/path_waypoint.qc b/qcsrc/server/pathlib/path_waypoint.qc index f60932c66..906ebc7a5 100644 --- a/qcsrc/server/pathlib/path_waypoint.qc +++ b/qcsrc/server/pathlib/path_waypoint.qc @@ -159,7 +159,7 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback) pathlib_searched_cnt = 0; pathlib_foundgoal = false; - LOG_TRACE("pathlib_waypointpath init\n"); + LOG_TRACE("pathlib_waypointpath init"); // Initialize waypoint grid IL_EACH(g_waypoints, true, @@ -179,10 +179,10 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback) start_node = wp_from; start_node.pathlib_list = closedlist; - LOG_TRACE("Expanding ",ftos(pathlib_wpp_expand(start_node))," links\n"); + LOG_TRACE("Expanding ",ftos(pathlib_wpp_expand(start_node))," links"); if(pathlib_open_cnt <= 0) { - LOG_TRACE("pathlib_waypointpath: Start waypoint not linked! aborting.\n"); + LOG_TRACE("pathlib_waypointpath: Start waypoint not linked! aborting."); return NULL; } @@ -196,17 +196,17 @@ entity pathlib_waypointpath_step() n = pathlib_wpp_bestopen(); if(!n) { - LOG_TRACE("Cannot find best open node, abort.\n"); + LOG_TRACE("Cannot find best open node, abort."); return NULL; } pathlib_wpp_close(n); - LOG_TRACE("Expanding ",ftos(pathlib_wpp_expand(n))," links\n"); + LOG_TRACE("Expanding ",ftos(pathlib_wpp_expand(n))," links"); if(pathlib_foundgoal) { entity start, end, open, ln; - LOG_TRACE("Target found. Rebuilding and filtering path...\n"); + LOG_TRACE("Target found. Rebuilding and filtering path..."); buildpath_nodefilter = buildpath_nodefilter_none; start = path_build(NULL, start_node.origin, NULL, NULL); diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 4be19b879..958b0bd6e 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -265,7 +265,7 @@ vector Spawn_Score(entity this, entity spot, float mindist, float teamcheck) if(!found) { - LOG_TRACE("WARNING: spawnpoint at ", vtos(spot.origin), " could not find its target ", spot.target, "\n"); + LOG_TRACE("WARNING: spawnpoint at ", vtos(spot.origin), " could not find its target ", spot.target); return '-1 0 0'; } } diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index 22fd70a2e..aeb5574b3 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -459,7 +459,7 @@ void W_WeaponFrame(Player actor) switch (this.state) { default: - LOG_WARNF("unhandled weaponentity (%i) state for player (%i): %d\n", this, actor, this.state); + LOG_WARNF("unhandled weaponentity (%i) state for player (%i): %d", this, actor, this.state); break; case WS_INUSE: case WS_RAISE: -- 2.39.2