]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Replace print calls with logger calls
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 29 Aug 2015 06:42:19 +0000 (16:42 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 29 Aug 2015 06:42:19 +0000 (16:42 +1000)
Replace print and printf calls with LOG_INFO and LOG_INFOF
Replace dprint and dprintf calls with LOG_TRACE and LOG_TRACEF

139 files changed:
qcsrc/client/bgmscript.qc
qcsrc/client/command/cl_cmd.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/main.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/player_skeleton.qc
qcsrc/client/scoreboard.qc
qcsrc/client/tuba.qc
qcsrc/client/view.qc
qcsrc/common/command/generic.qc
qcsrc/common/command/rpn.qc
qcsrc/common/effects.qh
qcsrc/common/items/inventory.qh
qcsrc/common/items/item.qh
qcsrc/common/items/item/pickup.qc
qcsrc/common/items/item/pickup.qh
qcsrc/common/mapinfo.qc
qcsrc/common/minigames/cl_minigames.qc
qcsrc/common/minigames/minigame/nmm.qc
qcsrc/common/minigames/minigame/ttt.qc
qcsrc/common/minigames/sv_minigames.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/movetypes/movetypes.qc
qcsrc/common/movetypes/push.qc
qcsrc/common/mutators/base.qh
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/physics.qc
qcsrc/common/playerstats.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/target/spawn.qc
qcsrc/common/triggers/teleporters.qc
qcsrc/common/triggers/trigger/disablerelay.qc
qcsrc/common/triggers/trigger/viewloc.qc
qcsrc/common/turrets/checkpoint.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/turrets/config.qc
qcsrc/common/turrets/config.qh
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/unit/ewheel.qc
qcsrc/common/turrets/unit/mlrs.qc
qcsrc/common/turrets/unit/walker.qc
qcsrc/common/util.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/unit/bumblebee.qc
qcsrc/common/viewloc.qc
qcsrc/common/weapons/calculations.qc
qcsrc/common/weapons/config.qc
qcsrc/common/weapons/config.qh
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_porto.qc
qcsrc/common/weapons/w_rifle.qc
qcsrc/common/weapons/w_shockwave.qc
qcsrc/csqcmodellib/cl_player.qc
qcsrc/lib/prandom.qc
qcsrc/lib/test.qc
qcsrc/lib/urllib.qc
qcsrc/menu/command/menu_cmd.qc
qcsrc/menu/draw.qc
qcsrc/menu/item/label.qc
qcsrc/menu/menu.qc
qcsrc/menu/skin.qh
qcsrc/menu/xonotic/maplist.qc
qcsrc/menu/xonotic/serverlist.qc
qcsrc/menu/xonotic/skinlist.qc
qcsrc/menu/xonotic/slider_decibels.qc
qcsrc/menu/xonotic/slider_resolution.qc
qcsrc/menu/xonotic/statslist.qc
qcsrc/menu/xonotic/util.qc
qcsrc/server-testcase/framework.qc
qcsrc/server/bot/aim.qc
qcsrc/server/bot/bot.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/havocbot/role_keyhunt.qc
qcsrc/server/bot/havocbot/roles.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/campaign.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/banning.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/radarmap.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/ent_cs.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_tetris.qc
qcsrc/server/g_world.qc
qcsrc/server/ipban.qc
qcsrc/server/mapvoting.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode_assault.qc
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_cts.qc
qcsrc/server/mutators/gamemode_domination.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/mutators/gamemode_invasion.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/gamemode_lms.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/gamemode_race.qc
qcsrc/server/mutators/gamemode_tdm.qc
qcsrc/server/mutators/mutator_new_toys.qc
qcsrc/server/mutators/mutator_physical_items.qc
qcsrc/server/mutators/mutator_random_gravity.qc
qcsrc/server/mutators/mutator_superspec.qc
qcsrc/server/mutators/sandbox.qc
qcsrc/server/pathlib.qc
qcsrc/server/pathlib/expandnode.qc
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/movenode.qc
qcsrc/server/pathlib/path_waypoint.qc
qcsrc/server/playerdemo.qc
qcsrc/server/portals.qc
qcsrc/server/race.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/t_plats.qc
qcsrc/server/teamplay.qc
qcsrc/server/weapons/spawning.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/weaponstats.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/server.qc

index 697cae91ca3296d36c9d0c79612bb575a7ab4e38..894bf6955af35a3b376199c29e12fe351ca1f5e2 100644 (file)
@@ -136,7 +136,7 @@ void BGMScript_InitEntity(entity e)
                e.bgmscriptline = e.bgmscriptline0 = i;
                if(i >= bgmscriptbufsize)
                {
-                       printf("ERROR: bgmscript does not define %s\n", e.bgmscript);
+                       LOG_INFOF("ERROR: bgmscript does not define %s\n", e.bgmscript);
                        strunzone(e.bgmscript);
                        e.bgmscript = string_null;
                }
index 9fe33a4fc00cf06d88bc51a93c45d1a20c5f72b0..b5980e216f1715d88a4af1b17e7bcb2dfd8ef228 100644 (file)
@@ -53,22 +53,22 @@ void LocalCommand_blurtest(int request)
                        blurtest_time1 = time + stof(argv(1));
                        blurtest_radius = stof(argv(2));
                        blurtest_power = stof(argv(3));
-                       print("Enabled blurtest\n");
+                       LOG_INFO("Enabled blurtest\n");
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd blurtest\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd blurtest\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
        #else
        if(request)
        {
-               print("Blurtest is not enabled on this client.\n");
+               LOG_INFO("Blurtest is not enabled on this client.\n");
                return;
        }
        #endif
@@ -104,22 +104,22 @@ void LocalCommand_boxparticles(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2boxparticles^7\n");
+                       LOG_INFO("Incorrect parameters for ^2boxparticles^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 lv_cmd boxparticles effectname own org_from org_to, dir_from, dir_to, countmultiplier, flags\n");
-                       print("  'effectname' is the name of a particle effect in effectinfo.txt\n");
-                       print("  'own' is the entity number of the owner (negative for csqc ent, positive for svqc ent)\n");
-                       print("  'org_from' is the starting origin of the box\n");
-                       print("  'org_to' is the ending origin of the box\n");
-                       print("  'dir_from' is the minimum velocity\n");
-                       print("  'dir_to' is the maximum velocity\n");
-                       print("  'countmultiplier' defines a multiplier for the particle count (affects count only, not countabsolute or trailspacing)\n");
-                       print("  'flags' can contain:\n");
-                       print("    1 to respect globals particles_alphamin, particles_alphamax (set right before via prvm_globalset client)\n");
-                       print("    2 to respect globals particles_colormin, particles_colormax (set right before via prvm_globalset client)\n");
-                       print("    4 to respect globals particles_fade (set right before via prvm_globalset client)\n");
-                       print("    128 to draw a trail, not a box\n");
+                       LOG_INFO("\nUsage:^3 lv_cmd boxparticles effectname own org_from org_to, dir_from, dir_to, countmultiplier, flags\n");
+                       LOG_INFO("  'effectname' is the name of a particle effect in effectinfo.txt\n");
+                       LOG_INFO("  'own' is the entity number of the owner (negative for csqc ent, positive for svqc ent)\n");
+                       LOG_INFO("  'org_from' is the starting origin of the box\n");
+                       LOG_INFO("  'org_to' is the ending origin of the box\n");
+                       LOG_INFO("  'dir_from' is the minimum velocity\n");
+                       LOG_INFO("  'dir_to' is the maximum velocity\n");
+                       LOG_INFO("  'countmultiplier' defines a multiplier for the particle count (affects count only, not countabsolute or trailspacing)\n");
+                       LOG_INFO("  'flags' can contain:\n");
+                       LOG_INFO("    1 to respect globals particles_alphamin, particles_alphamax (set right before via prvm_globalset client)\n");
+                       LOG_INFO("    2 to respect globals particles_colormin, particles_colormax (set right before via prvm_globalset client)\n");
+                       LOG_INFO("    4 to respect globals particles_fade (set right before via prvm_globalset client)\n");
+                       LOG_INFO("    128 to draw a trail, not a box\n");
                        return;
                }
        }
@@ -142,13 +142,13 @@ void LocalCommand_create_scrshot_ent(int request)
                                fputs(fh, strcat("\"angles\" \"", strcat(ftos(view_angles.x), " ", ftos(view_angles.y), " ", ftos(view_angles.z)), "\"\n"));
                                fputs(fh, "}\n");
 
-                               print("Completed screenshot entity dump in ^2data/data/", MapInfo_Map_bspname, "_scrshot_ent.txt^7.\n");
+                               LOG_INFO("Completed screenshot entity dump in ^2data/data/", MapInfo_Map_bspname, "_scrshot_ent.txt^7.\n");
 
                                fclose(fh);
                        }
                        else
                        {
-                               print("^1Error: ^7Could not dump to file!\n");
+                               LOG_INFO("^1Error: ^7Could not dump to file!\n");
                        }
                        return;
                }
@@ -156,8 +156,8 @@ void LocalCommand_create_scrshot_ent(int request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd create_scrshot_ent\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd create_scrshot_ent\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -186,8 +186,8 @@ void LocalCommand_debugmodel(int request, int argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd debugmodel model\n");
-                       print("  Where 'model' is a string of the model name to use for the debug model.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd debugmodel model\n");
+                       LOG_INFO("  Where 'model' is a string of the model name to use for the debug model.\n");
                        return;
                }
        }
@@ -230,11 +230,11 @@ void LocalCommand_handlevote(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2handlevote^7\n");
+                       LOG_INFO("Incorrect parameters for ^2handlevote^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd handlevote vote\n");
-                       print("  Where 'vote' is the selection for either the current poll or uid2name.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd handlevote vote\n");
+                       LOG_INFO("  Where 'vote' is the selection for either the current poll or uid2name.\n");
                        return;
                }
        }
@@ -306,15 +306,15 @@ void LocalCommand_hud(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2hud^7\n");
+                       LOG_INFO("Incorrect parameters for ^2hud^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd hud action [configname | radartoggle | layout]\n");
-                       print("  Where 'action' is the command to complete,\n");
-                       print("  'configname' is the name to save to for \"save\" action,\n");
-                       print("  'radartoggle' is to control hud_panel_radar_maximized for \"radar\" action,\n");
-                       print("  and 'layout' is how to organize the scoreboard columns for the set action.\n");
-                       print("  Full list of commands here: \"configure, minigame, save, scoreboard_columns_help, scoreboard_columns_set, radar.\"\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd hud action [configname | radartoggle | layout]\n");
+                       LOG_INFO("  Where 'action' is the command to complete,\n");
+                       LOG_INFO("  'configname' is the name to save to for \"save\" action,\n");
+                       LOG_INFO("  'radartoggle' is to control hud_panel_radar_maximized for \"radar\" action,\n");
+                       LOG_INFO("  and 'layout' is how to organize the scoreboard columns for the set action.\n");
+                       LOG_INFO("  Full list of commands here: \"configure, minigame, save, scoreboard_columns_help, scoreboard_columns_set, radar.\"\n");
                        return;
                }
        }
@@ -334,11 +334,11 @@ void LocalCommand_localprint(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2localprint^7\n");
+                       LOG_INFO("Incorrect parameters for ^2localprint^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd localprint \"message\"\n");
-                       print("  'message' is the centerprint message to send to yourself.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd localprint \"message\"\n");
+                       LOG_INFO("  'message' is the centerprint message to send to yourself.\n");
                        return;
                }
        }
@@ -358,11 +358,11 @@ void LocalCommand_mv_download(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2mv_download^7\n");
+                       LOG_INFO("Incorrect parameters for ^2mv_download^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd mv_download mapid\n");
-                       print("  Where 'mapid' is the id number of the map to request an image of on the map vote selection menu.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd mv_download mapid\n");
+                       LOG_INFO("  Where 'mapid' is the id number of the map to request an image of on the map vote selection menu.\n");
                        return;
                }
        }
@@ -377,17 +377,17 @@ void LocalCommand_find(int request, int argc)
                        entity client;
 
                        for(client = world; (client = find(client, classname, argv(1))); )
-                               print(etos(client), "\n");
+                               LOG_INFO(etos(client), "\n");
 
                        return;
                }
 
                default:
-                       print("Incorrect parameters for ^2find^7\n");
+                       LOG_INFO("Incorrect parameters for ^2find^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd find classname\n");
-                       print("  Where 'classname' is the classname to search for.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd find classname\n");
+                       LOG_INFO("  Where 'classname' is the classname to search for.\n");
                        return;
                }
        }
@@ -417,11 +417,11 @@ void LocalCommand_sendcvar(int request, int argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2sendcvar^7\n");
+                       LOG_INFO("Incorrect parameters for ^2sendcvar^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 cl_cmd sendcvar <cvar>\n");
-                       print("  Where 'cvar' is the cvar plus arguments to send to the server.\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd sendcvar <cvar>\n");
+                       LOG_INFO("  Where 'cvar' is the cvar plus arguments to send to the server.\n");
                        return;
                }
        }
@@ -472,7 +472,7 @@ void LocalCommand_(int request)
 void LocalCommand_macro_help()
 {
        #define CLIENT_COMMAND(name,function,description) \
-               { if(strtolower(description) != "") { print("  ^2", name, "^7: ", description, "\n"); } }
+               { if(strtolower(description) != "") { LOG_INFO("  ^2", name, "^7: ", description, "\n"); } }
 
        CLIENT_COMMANDS(0, 0);
        #undef CLIENT_COMMAND
@@ -532,14 +532,14 @@ void GameCommand(string command)
        {
                if(argc == 1)
                {
-                       print("\nClient console commands:\n");
+                       LOG_INFO("\nClient console commands:\n");
                        LocalCommand_macro_help();
 
-                       print("\nGeneric commands shared by all programs:\n");
+                       LOG_INFO("\nGeneric commands shared by all programs:\n");
                        GenericCommand_macro_help();
 
-                       print("\nUsage:^3 cl_cmd COMMAND...^7, where possible commands are listed above.\n");
-                       print("For help about a specific command, type cl_cmd help COMMAND\n");
+                       LOG_INFO("\nUsage:^3 cl_cmd COMMAND...^7, where possible commands are listed above.\n");
+                       LOG_INFO("For help about a specific command, type cl_cmd help COMMAND\n");
 
                        return;
                }
@@ -559,7 +559,7 @@ void GameCommand(string command)
        ) return;
 
        // nothing above caught the command, must be invalid
-       print(((command != "") ? strcat("Unknown client command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try cl_cmd help.\n");
+       LOG_INFO(((command != "") ? strcat("Unknown client command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try cl_cmd help.\n");
 
        return;
 }
index 80b68a6e287384480a002026329a1f8f4cba283d..49cb1c6a0d562e8173a120ba3de2a3ff65bea595 100644 (file)
@@ -137,7 +137,7 @@ void CSQCPlayer_ModelAppearance_PostUpdate(void)
                self.forceplayermodels_isgoodmodel = fexists(self.forceplayermodels_savemodel);
                self.forceplayermodels_isgoodmodel_mdl = self.forceplayermodels_savemodel;
                if(!self.forceplayermodels_isgoodmodel)
-                       printf("Warning: missing model %s has been used\n", self.forceplayermodels_savemodel);
+                       LOG_INFOF("Warning: missing model %s has been used\n", self.forceplayermodels_savemodel);
        }
 }
 void CSQCPlayer_ModelAppearance_Apply(bool islocalplayer)
@@ -379,7 +379,7 @@ int CSQCPlayer_FallbackFrame(int f)
                case 29: return 4; // anim_duckwalkbackright -> anim_duckwalk
                case 30: return 4; // anim_duckwalkbackleft -> anim_duckwalk
        }
-       printf("Frame %d missing in model %s, and we have no fallback - FAIL!\n", f, self.model);
+       LOG_INFOF("Frame %d missing in model %s, and we have no fallback - FAIL!\n", f, self.model);
        return f;
 }
 void CSQCPlayer_FallbackFrame_Apply(void)
@@ -450,7 +450,7 @@ void CSQCModel_AutoTagIndex_Apply(void)
                                                        // we need to prevent this from 'appening
                                                        self.tag_entity = world;
                                                        self.drawmask = 0;
-                                                       dprint("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\n");
                                                }
                                        }
                                        else if(self.tag_entity.isplayermodel)
index 32028ce423caa39dd81f8d73a46d6ce753b6949d..81ae0bb5c68a49c58f6c60a638facf16f1a8d079 100644 (file)
@@ -2731,7 +2731,7 @@ void HUD_Vote(void)
                {
                        vote_yescount = 0;
                        vote_nocount = 0;
-                       print(_("^1You must answer before entering hud configure mode\n"));
+                       LOG_INFO(_("^1You must answer before entering hud configure mode\n"));
                        cvar_set("_hud_configure", "0");
                }
                if(vote_called_vote)
@@ -4811,7 +4811,7 @@ void HUD_Main (void)
                        }
                }
                if (warning)
-                       dprint("Automatically fixed wrong/missing panel numbers in _hud_panelorder\n");
+                       LOG_TRACE("Automatically fixed wrong/missing panel numbers in _hud_panelorder\n");
 
                cvar_set("_hud_panelorder", s);
                if(hud_panelorder_prev)
index ca7fde9e049436e99d1d8f2acd0f2b1e1f116973..33908855036027b485b0c2178af9af7c02f0a921 100644 (file)
@@ -215,11 +215,11 @@ void HUD_Panel_ExportCfg(string cfgname)
                }
                HUD_Write("menu_sync\n"); // force the menu to reread the cvars, so that the dialogs are updated
 
-               printf(_("^2Successfully exported to %s! (Note: It's saved in data/data/)\n"), filename);
+               LOG_INFOF(_("^2Successfully exported to %s! (Note: It's saved in data/data/)\n"), filename);
                fclose(fh);
        }
        else
-               printf(_("^1Couldn't write to %s\n"), filename);
+               LOG_INFOF(_("^1Couldn't write to %s\n"), filename);
 }
 
 void HUD_Configure_Exit_Force()
index ed50dda37878b5b7dc20e67a08f09708875215e6..85aae33c48fcfae4085b7d51fac11cc2342f0967 100644 (file)
@@ -90,7 +90,7 @@ void CSQC_Init(void)
        prvm_language = cvar_string("prvm_language");
 
 #ifdef WATERMARK
-       dprintf("^4CSQC Build information: ^1%s\n", WATERMARK);
+       LOG_TRACEF("^4CSQC Build information: ^1%s\n", WATERMARK);
 #endif
 
        int i;
@@ -245,7 +245,7 @@ float SetTeam(entity o, int Team)
                        default:
                                if(GetTeam(Team, false) == world)
                                {
-                                       dprintf("trying to switch to unsupported team %d\n", Team);
+                                       LOG_TRACEF("trying to switch to unsupported team %d\n", Team);
                                        Team = NUM_SPECTATOR;
                                }
                                break;
@@ -261,7 +261,7 @@ float SetTeam(entity o, int Team)
                        default:
                                if(GetTeam(Team, false) == world)
                                {
-                                       dprintf("trying to switch to unsupported team %d\n", Team);
+                                       LOG_TRACEF("trying to switch to unsupported team %d\n", Team);
                                        Team = NUM_SPECTATOR;
                                }
                                break;
@@ -457,7 +457,7 @@ void Ent_ReadPlayerScore()
        if(!isNew && n != self.sv_entnum)
        {
                //print("A CSQC entity changed its owner!\n");
-               printf("A CSQC entity changed its owner! (edict: %d, classname: %s)\n", num_for_edict(self), self.classname);
+               LOG_INFOF("A CSQC entity changed its owner! (edict: %d, classname: %s)\n", num_for_edict(self), self.classname);
                isNew = true;
                Ent_Remove();
                self.enttype = ENT_CLIENT_SCORES;
@@ -806,7 +806,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
        t = ReadByte();
 
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Ent_Update(%d) with self=%i self.entnum=%d self.enttype=%d t=%d\n", bIsNewEntity, self, self.entnum, self.enttype, t);
+               LOG_INFOF("CSQC_Ent_Update(%d) with self=%i self.entnum=%d self.enttype=%d t=%d\n", bIsNewEntity, self, self.entnum, self.enttype, t);
 
        // set up the "time" global for received entities to be correct for interpolation purposes
        savetime = time;
@@ -827,7 +827,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
                if(t != self.enttype || bIsNewEntity)
                {
                        //print("A CSQC entity changed its type!\n");
-                       printf("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n", num_for_edict(self), self.entnum, self.enttype, t);
+                       LOG_INFOF("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n", num_for_edict(self), self.entnum, self.enttype, t);
                        Ent_Remove();
                        clearentity(self);
                        bIsNewEntity = 1;
@@ -837,7 +837,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
        {
                if(!bIsNewEntity)
                {
-                       printf("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n", num_for_edict(self), self.entnum, t);
+                       LOG_INFOF("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n", num_for_edict(self), self.entnum, t);
                        bIsNewEntity = 1;
                }
        }
@@ -944,11 +944,11 @@ void Ent_Remove()
 void CSQC_Ent_Remove()
 {
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Ent_Remove() with self=%i self.entnum=%d self.enttype=%d\n", self, self.entnum, self.enttype);
+               LOG_INFOF("CSQC_Ent_Remove() with self=%i self.entnum=%d self.enttype=%d\n", self, self.entnum, self.enttype);
 
        if(wasfreed(self))
        {
-               print("WARNING: CSQC_Ent_Remove called for already removed entity. Packet loss?\n");
+               LOG_INFO("WARNING: CSQC_Ent_Remove called for already removed entity. Packet loss?\n");
                return;
        }
        if(self.enttype)
@@ -969,7 +969,7 @@ void Gamemode_Init()
 void CSQC_Parse_StuffCmd(string strMessage)
 {
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Parse_StuffCmd(\"%s\")\n", strMessage);
+               LOG_INFOF("CSQC_Parse_StuffCmd(\"%s\")\n", strMessage);
 
        localcmd(strMessage);
 }
@@ -977,16 +977,16 @@ void CSQC_Parse_StuffCmd(string strMessage)
 void CSQC_Parse_Print(string strMessage)
 {
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Parse_Print(\"%s\")\n", strMessage);
+               LOG_INFOF("CSQC_Parse_Print(\"%s\")\n", strMessage);
 
-       print(ColorTranslateRGB(strMessage));
+       LOG_INFO(ColorTranslateRGB(strMessage));
 }
 
 // CSQC_Parse_CenterPrint : Provides the centerprint_hud string in the first parameter that the server provided.
 void CSQC_Parse_CenterPrint(string strMessage)
 {
        if(autocvar_developer_csqcentities)
-               printf("CSQC_Parse_CenterPrint(\"%s\")\n", strMessage);
+               LOG_INFOF("CSQC_Parse_CenterPrint(\"%s\")\n", strMessage);
 
        centerprint_hud(strMessage);
 }
@@ -1275,7 +1275,7 @@ float CSQC_Parse_TempEntity()
        int nTEID = ReadByte();
 
        if (autocvar_developer_csqcentities)
-               printf("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID);
+               LOG_INFOF("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID);
 
        switch (nTEID)
        {
index 037d906fbe09c1ec9f3a2b0f91a77be42c609e4a..3511c743f05b7478a6436c884775742962532b72 100644 (file)
@@ -495,7 +495,7 @@ void Cmd_MapVote_MapDownload(float argc)
 
        if(argc != 2 || !mv_pk3list)
        {
-               print(_("mv_mapdownload: ^3You're not supposed to use this command on your own!\n"));
+               LOG_INFO(_("mv_mapdownload: ^3You're not supposed to use this command on your own!\n"));
                return;
        }
 
@@ -505,7 +505,7 @@ void Cmd_MapVote_MapDownload(float argc)
                        break;
 
        if(!pak || pak.sv_entnum != id) {
-               print(_("^1Error:^7 Couldn't find pak index.\n"));
+               LOG_INFO(_("^1Error:^7 Couldn't find pak index.\n"));
                return;
        }
 
@@ -514,7 +514,7 @@ void Cmd_MapVote_MapDownload(float argc)
                mv_preview[id] = true;
                return;
        } else {
-               print(_("Requesting preview...\n"));
+               LOG_INFO(_("Requesting preview...\n"));
                localcmd(strcat("\ncmd mv_getpicture ", ftos(id), "\n"));
        }
 }
index fbd98da95e53021332869743c5be700f3293b1d8..9bf0a855fa5375e53db412db0f7cae6d89e3efa0 100644 (file)
@@ -107,7 +107,7 @@ void RemoveTeam(entity Team)
 
        if(!tm)
        {
-               print(_("Trying to remove a team which is not in the teamlist!"));
+               LOG_INFO(_("Trying to remove a team which is not in the teamlist!"));
                return;
        }
        parent.sort_next = Team.sort_next;
@@ -566,7 +566,7 @@ void URI_Get_Callback(int id, float status, string data)
        }
        else
        {
-               printf("Received HTTP request data for an invalid id %d.\n", id);
+               LOG_INFOF("Received HTTP request data for an invalid id %d.\n", id);
        }
 }
 
@@ -591,7 +591,7 @@ void Accuracy_LoadLevels()
                if(acc_levels > MAX_ACCURACY_LEVELS)
                        acc_levels = MAX_ACCURACY_LEVELS;
                if(acc_levels < 2)
-                       print("Warning: accuracy_color_levels must contain at least 2 values\n");
+                       LOG_INFO("Warning: accuracy_color_levels must contain at least 2 values\n");
 
                int i;
                for(i = 0; i < acc_levels; ++i)
index 96b91d1c8042d4a7611e47da81b778443c625dbe..00f9543717f39c5f19c5c6e09cd7667d2f99e620 100644 (file)
@@ -48,7 +48,7 @@ void skeleton_loadinfo(entity e)
                }
        }
        else
-               dprint("No model parameters for ", e.model, "\n");
+               LOG_TRACE("No model parameters for ", e.model, "\n");
        //dprint(e.model, " uses ", ftos(e.bone_upperbody), " ", ftos(e.fixbone), "\n");
        get_model_parameters(string_null, 0);
        e.skeleton_info_modelindex = e.modelindex;
index c635e975496df63c584d1a56b8aa0253e6bd0a20..3b74f5932b0d5b9c861f1cd121b42711762947fc 100644 (file)
@@ -245,56 +245,56 @@ void HUD_UpdateTeamPos(entity Team)
 
 void Cmd_HUD_Help()
 {
-       print(_("You can modify the scoreboard using the ^2scoreboard_columns_set command.\n"));
-       print(_("^3|---------------------------------------------------------------|\n"));
-       print(_("Usage:\n"));
-       print(_("^2scoreboard_columns_set default\n"));
-       print(_("^2scoreboard_columns_set ^7field1 field2 ...\n"));
-       print(_("The following field names are recognized (case insensitive):\n"));
-       print(_("You can use a ^3|^7 to start the right-aligned fields.\n\n"));
-
-       print(_("^3name^7 or ^3nick^7             Name of a player\n"));
-       print(_("^3ping^7                     Ping time\n"));
-       print(_("^3pl^7                       Packet loss\n"));
-       print(_("^3kills^7                    Number of kills\n"));
-       print(_("^3deaths^7                   Number of deaths\n"));
-       print(_("^3suicides^7                 Number of suicides\n"));
-       print(_("^3frags^7                    kills - suicides\n"));
-       print(_("^3kd^7                       The kill-death ratio\n"));
-       print(_("^3sum^7                      frags - deaths\n"));
-       print(_("^3caps^7                     How often a flag (CTF) or a key (KeyHunt) was captured\n"));
-       print(_("^3pickups^7                  How often a flag (CTF) or a key (KeyHunt) or a ball (Keepaway) was picked up\n"));
-       print(_("^3captime^7                  Time of fastest cap (CTF)\n"));
-       print(_("^3fckills^7                  Number of flag carrier kills\n"));
-       print(_("^3returns^7                  Number of flag returns\n"));
-       print(_("^3drops^7                    Number of flag drops\n"));
-       print(_("^3lives^7                    Number of lives (LMS)\n"));
-       print(_("^3rank^7                     Player rank\n"));
-       print(_("^3pushes^7                   Number of players pushed into void\n"));
-       print(_("^3destroyed^7                Number of keys destroyed by pushing them into void\n"));
-       print(_("^3kckills^7                  Number of keys carrier kills\n"));
-       print(_("^3losses^7                   Number of times a key was lost\n"));
-       print(_("^3laps^7                     Number of laps finished (race/cts)\n"));
-       print(_("^3time^7                     Total time raced (race/cts)\n"));
-       print(_("^3fastest^7                  Time of fastest lap (race/cts)\n"));
-       print(_("^3ticks^7                    Number of ticks (DOM)\n"));
-       print(_("^3takes^7                    Number of domination points taken (DOM)\n"));
-       print(_("^3bckills^7                  Number of ball carrier kills\n"));
-       print(_("^3bctime^7                   Total amount of time holding the ball in Keepaway\n"));
-       print(_("^3score^7                    Total score\n\n"));
-
-       print(_("Before a field you can put a + or - sign, then a comma separated list\n"
+       LOG_INFO(_("You can modify the scoreboard using the ^2scoreboard_columns_set command.\n"));
+       LOG_INFO(_("^3|---------------------------------------------------------------|\n"));
+       LOG_INFO(_("Usage:\n"));
+       LOG_INFO(_("^2scoreboard_columns_set default\n"));
+       LOG_INFO(_("^2scoreboard_columns_set ^7field1 field2 ...\n"));
+       LOG_INFO(_("The following field names are recognized (case insensitive):\n"));
+       LOG_INFO(_("You can use a ^3|^7 to start the right-aligned fields.\n\n"));
+
+       LOG_INFO(_("^3name^7 or ^3nick^7             Name of a player\n"));
+       LOG_INFO(_("^3ping^7                     Ping time\n"));
+       LOG_INFO(_("^3pl^7                       Packet loss\n"));
+       LOG_INFO(_("^3kills^7                    Number of kills\n"));
+       LOG_INFO(_("^3deaths^7                   Number of deaths\n"));
+       LOG_INFO(_("^3suicides^7                 Number of suicides\n"));
+       LOG_INFO(_("^3frags^7                    kills - suicides\n"));
+       LOG_INFO(_("^3kd^7                       The kill-death ratio\n"));
+       LOG_INFO(_("^3sum^7                      frags - deaths\n"));
+       LOG_INFO(_("^3caps^7                     How often a flag (CTF) or a key (KeyHunt) was captured\n"));
+       LOG_INFO(_("^3pickups^7                  How often a flag (CTF) or a key (KeyHunt) or a ball (Keepaway) was picked up\n"));
+       LOG_INFO(_("^3captime^7                  Time of fastest cap (CTF)\n"));
+       LOG_INFO(_("^3fckills^7                  Number of flag carrier kills\n"));
+       LOG_INFO(_("^3returns^7                  Number of flag returns\n"));
+       LOG_INFO(_("^3drops^7                    Number of flag drops\n"));
+       LOG_INFO(_("^3lives^7                    Number of lives (LMS)\n"));
+       LOG_INFO(_("^3rank^7                     Player rank\n"));
+       LOG_INFO(_("^3pushes^7                   Number of players pushed into void\n"));
+       LOG_INFO(_("^3destroyed^7                Number of keys destroyed by pushing them into void\n"));
+       LOG_INFO(_("^3kckills^7                  Number of keys carrier kills\n"));
+       LOG_INFO(_("^3losses^7                   Number of times a key was lost\n"));
+       LOG_INFO(_("^3laps^7                     Number of laps finished (race/cts)\n"));
+       LOG_INFO(_("^3time^7                     Total time raced (race/cts)\n"));
+       LOG_INFO(_("^3fastest^7                  Time of fastest lap (race/cts)\n"));
+       LOG_INFO(_("^3ticks^7                    Number of ticks (DOM)\n"));
+       LOG_INFO(_("^3takes^7                    Number of domination points taken (DOM)\n"));
+       LOG_INFO(_("^3bckills^7                  Number of ball carrier kills\n"));
+       LOG_INFO(_("^3bctime^7                   Total amount of time holding the ball in Keepaway\n"));
+       LOG_INFO(_("^3score^7                    Total score\n\n"));
+
+       LOG_INFO(_("Before a field you can put a + or - sign, then a comma separated list\n"
                "of game types, then a slash, to make the field show up only in these\n"
                "or in all but these game types. You can also specify 'all' as a\n"
                "field to show all fields available for the current game mode.\n\n"));
 
-       print(_("The special game type names 'teams' and 'noteams' can be used to\n"
+       LOG_INFO(_("The special game type names 'teams' and 'noteams' can be used to\n"
                "include/exclude ALL teams/noteams game modes.\n\n"));
 
-       print(_("Example: scoreboard_columns_set name ping pl | +ctf/field3 -dm/field4\n"));
-       print(_("will display name, ping and pl aligned to the left, and the fields\n"
+       LOG_INFO(_("Example: scoreboard_columns_set name ping pl | +ctf/field3 -dm/field4\n"));
+       LOG_INFO(_("will display name, ping and pl aligned to the left, and the fields\n"
                "right of the vertical bar aligned to the right.\n"));
-       print(_("'field3' will only be shown in CTF, and 'field4' will be shown in all\n"
+       LOG_INFO(_("'field3' will only be shown in CTF, and 'field4' will be shown in all\n"
                "other gamemodes except DM.\n"));
 }
 
@@ -412,7 +412,7 @@ void Cmd_HUD_SetFields(float argc)
                        else
                        {
                                if (!nocomplain)
-                                       printf("^1Error:^7 Unknown score field: '%s'\n", str);
+                                       LOG_INFOF("^1Error:^7 Unknown score field: '%s'\n", str);
                                continue;
                        }
 :found
@@ -449,7 +449,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_title[0] = strzone(TranslateScoresLabel("name"));
                        hud_field[0] = SP_NAME;
                        ++hud_num_fields;
-                       print("fixed missing field 'name'\n");
+                       LOG_INFO("fixed missing field 'name'\n");
 
                        if(!have_separator)
                        {
@@ -464,7 +464,7 @@ void Cmd_HUD_SetFields(float argc)
                                hud_field[1] = SP_SEPARATOR;
                                hud_size[1] = stringwidth("|", false, hud_fontsize);
                                ++hud_num_fields;
-                               print("fixed missing field '|'\n");
+                               LOG_INFO("fixed missing field '|'\n");
                        }
                }
                else if(!have_separator)
@@ -474,7 +474,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_size[hud_num_fields] = stringwidth("|", false, hud_fontsize);
                        hud_field[hud_num_fields] = SP_SEPARATOR;
                        ++hud_num_fields;
-                       print("fixed missing field '|'\n");
+                       LOG_INFO("fixed missing field '|'\n");
                }
                if(!have_secondary)
                {
@@ -483,7 +483,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], false, hud_fontsize);
                        hud_field[hud_num_fields] = ps_secondary;
                        ++hud_num_fields;
-                       printf("fixed missing field '%s'\n", scores_label[ps_secondary]);
+                       LOG_INFOF("fixed missing field '%s'\n", scores_label[ps_secondary]);
                }
                if(!have_primary)
                {
@@ -492,7 +492,7 @@ void Cmd_HUD_SetFields(float argc)
                        hud_size[hud_num_fields] = stringwidth(hud_title[hud_num_fields], false, hud_fontsize);
                        hud_field[hud_num_fields] = ps_primary;
                        ++hud_num_fields;
-                       printf("fixed missing field '%s'\n", scores_label[ps_primary]);
+                       LOG_INFOF("fixed missing field '%s'\n", scores_label[ps_primary]);
                }
        }
 
index 2b9dcd0a83840e80d9126196abb6185aa7cfb878..b95dd99e324773ab5f437e5ddcc7a5fe446aae48 100644 (file)
@@ -163,7 +163,7 @@ void Tuba_Precache()
        Tuba_PitchStep = autocvar_g_balance_tuba_pitchstep;
        if (Tuba_PitchStep) {
                if (!checkextension("DP_SND_SOUND7_WIP2") && !checkextension("DP_SND_SOUND7")) {
-                       print("^1NOTE:^7 requested pitch shifting, but not supported by this engine build\n");
+                       LOG_INFO("^1NOTE:^7 requested pitch shifting, but not supported by this engine build\n");
                        Tuba_PitchStep = 0;
                }
        }
index 7720f58fbe6fa73d06c2f91296852c3e43aecd5a..f1a7f2234ca0f97c42bf2f42b91e467843c65e9f 100644 (file)
@@ -471,7 +471,7 @@ void UpdateDamage()
        if (damage_dealt_time != damage_dealt_time_prev)
        {
                unaccounted_damage += unaccounted_damage_new;
-               dprint("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")", "\n");
+               LOG_TRACE("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")", "\n");
        }
        damage_dealt_time_prev = damage_dealt_time;
 
@@ -511,7 +511,7 @@ void UpdateHitsound()
                                pitch_shift = mirror_value + (mirror_value - pitch_shift);
                        }
 
-                       dprint("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), "\n");
 
                        // todo: avoid very long and very short sounds from wave stretching using different sound files? seems unnecessary
                        // todo: normalize sound pressure levels? seems unnecessary
@@ -1258,7 +1258,7 @@ void CSQC_UpdateView(float w, float h)
                setproperty(VF_ANGLES, '90 0 0');
 
                #if 0
-               printf("OrthoView: org = %s, angles = %s, distance = %f, nearest = %f, furthest = %f\n",
+               LOG_INFOF("OrthoView: org = %s, angles = %s, distance = %f, nearest = %f, furthest = %f\n",
                        vtos(ov_org),
                        vtos(getpropertyvec(VF_ANGLES)),
                        ov_distance,
index 14bc58947a3660cf9e9d8448421559961766c142..0c8f85816f124f2668255db78a3872a8bb81b033 100644 (file)
@@ -50,7 +50,7 @@ void Curl_URI_Get_Callback(int id, float status, string data)
        string do_cvar = curl_uri_get_cvar[i];
        if(status != 0)
        {
-               dprintf("error: status is %d\n", status);
+               LOG_TRACEF("error: status is %d\n", status);
                if(do_cvar)
                        strunzone(do_cvar);
                return;
@@ -64,7 +64,7 @@ void Curl_URI_Get_Callback(int id, float status, string data)
        }
        if(!do_exec)
                if (!do_cvar)
-                       print(data);
+                       LOG_INFO(data);
 }
 
 
@@ -102,12 +102,12 @@ void GenericCommand_addtolist(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2addtolist^7\n");
+                       LOG_INFO("Incorrect parameters for ^2addtolist^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " addtolist variable value\n"));
-                       print("  Where 'variable' is what to add 'value' to.\n");
-                       print("See also: ^2removefromlist^7\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " addtolist variable value\n"));
+                       LOG_INFO("  Where 'variable' is what to add 'value' to.\n");
+                       LOG_INFO("See also: ^2removefromlist^7\n");
                        return;
                }
        }
@@ -169,7 +169,7 @@ void GenericCommand_qc_curl(float request, float argc)
                                curl_uri_get_pos = (curl_uri_get_pos + 1) % (URI_GET_CURL_END - URI_GET_CURL + 1);
                        }
                        else
-                               print(_("error creating curl handle\n"));
+                               LOG_INFO(_("error creating curl handle\n"));
 
                        buf_del(buf);
 
@@ -179,7 +179,7 @@ void GenericCommand_qc_curl(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " qc_curl [--key N] [--cvar] [--exec] URL [postargs...]"));
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " qc_curl [--key N] [--cvar] [--exec] URL [postargs...]"));
                        return;
                }
        }
@@ -219,13 +219,13 @@ void GenericCommand_dumpcommands(float request)
                                CMD_Write("\ndump of generic commands:\n");
                                GenericCommand_macro_write_aliases(fh);
 
-                               print("Completed dump of aliases in ^2data/data/", GetProgramCommandPrefix(), "_dump.txt^7.\n");
+                               LOG_INFO("Completed dump of aliases in ^2data/data/", GetProgramCommandPrefix(), "_dump.txt^7.\n");
 
                                fclose(fh);
                        }
                        else
                        {
-                               print("^1Error: ^7Could not dump to file!\n");
+                               LOG_INFO("^1Error: ^7Could not dump to file!\n");
                        }
                        return;
                }
@@ -233,8 +233,8 @@ void GenericCommand_dumpcommands(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpcommands"));
-                       print("  No arguments required.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpcommands"));
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -253,7 +253,7 @@ void GenericCommand_dumpitems(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       printf("\nUsage:^3 %s dumpitems", GetProgramCommandPrefix());
+                       LOG_INFOF("\nUsage:^3 %s dumpitems", GetProgramCommandPrefix());
                        return;
                }
        }
@@ -284,15 +284,15 @@ void GenericCommand_dumpnotifs(float request)
                        if(fh >= 0)
                        {
                                Dump_Notifications(fh, alsoprint);
-                               printf("Dumping notifications... File located in ^2data/data/%s^7.\n", filename);
+                               LOG_INFOF("Dumping notifications... File located in ^2data/data/%s^7.\n", filename);
                                fclose(fh);
                        }
                        else
                        {
-                               printf("^1Error: ^7Could not open file '%s'!\n", filename);
+                               LOG_INFOF("^1Error: ^7Could not open file '%s'!\n", filename);
                        }
                        #else
-                       print(_("Notification dump command only works with cl_cmd and sv_cmd.\n"));
+                       LOG_INFO(_("Notification dump command only works with cl_cmd and sv_cmd.\n"));
                        #endif
                        return;
                }
@@ -300,10 +300,10 @@ void GenericCommand_dumpnotifs(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]"));
-                       print("  Where 'filename' is the file to write (default is notifications_dump.cfg),\n");
-                       print("  if supplied with '-' output to console as well as default,\n");
-                       print("  if left blank, it will only write to default.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]"));
+                       LOG_INFO("  Where 'filename' is the file to write (default is notifications_dump.cfg),\n");
+                       LOG_INFO("  if supplied with '-' output to console as well as default,\n");
+                       LOG_INFO("  if left blank, it will only write to default.\n");
                        return;
                }
        }
@@ -335,17 +335,17 @@ void GenericCommand_dumpweapons(float request) // WEAPONTODO: make this work wit
                        if(wep_config_file >= 0)
                        {
                                Dump_Weapon_Settings();
-                               print(sprintf("Dumping weapons... File located in ^2data/data/%s^7.\n", filename));
+                               LOG_INFO(sprintf("Dumping weapons... File located in ^2data/data/%s^7.\n", filename));
                                fclose(wep_config_file);
                                wep_config_file = -1;
                                wep_config_alsoprint = -1;
                        }
                        else
                        {
-                               print(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
+                               LOG_INFO(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
                        }
                        #else
-                       print(_("Weapons dump command only works with sv_cmd.\n"));
+                       LOG_INFO(_("Weapons dump command only works with sv_cmd.\n"));
                        #endif
                        return;
                }
@@ -353,10 +353,10 @@ void GenericCommand_dumpweapons(float request) // WEAPONTODO: make this work wit
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]"));
-                       print("  Where 'filename' is the file to write (default is weapons_dump.cfg),\n");
-                       print("  if supplied with '-' output to console as well as default,\n");
-                       print("  if left blank, it will only write to default.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]"));
+                       LOG_INFO("  Where 'filename' is the file to write (default is weapons_dump.cfg),\n");
+                       LOG_INFO("  if supplied with '-' output to console as well as default,\n");
+                       LOG_INFO("  if left blank, it will only write to default.\n");
                        return;
                }
        }
@@ -388,17 +388,17 @@ void GenericCommand_dumpturrets(float request)
                        if(tur_config_file >= 0)
                        {
                                Dump_Turret_Settings();
-                               print(sprintf("Dumping turrets... File located in ^2data/data/%s^7.\n", filename));
+                               LOG_INFO(sprintf("Dumping turrets... File located in ^2data/data/%s^7.\n", filename));
                                fclose(tur_config_file);
                                tur_config_file = -1;
                                tur_config_alsoprint = -1;
                        }
                        else
                        {
-                               print(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
+                               LOG_INFO(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
                        }
                        #else
-                       print(_("Turrets dump command only works with sv_cmd.\n"));
+                       LOG_INFO(_("Turrets dump command only works with sv_cmd.\n"));
                        #endif
                        return;
                }
@@ -406,10 +406,10 @@ void GenericCommand_dumpturrets(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpturrets [filename]"));
-                       print("  Where 'filename' is the file to write (default is turrets_dump.cfg),\n");
-                       print("  if supplied with '-' output to console as well as default,\n");
-                       print("  if left blank, it will only write to default.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " dumpturrets [filename]"));
+                       LOG_INFO("  Where 'filename' is the file to write (default is turrets_dump.cfg),\n");
+                       LOG_INFO("  if supplied with '-' output to console as well as default,\n");
+                       LOG_INFO("  if left blank, it will only write to default.\n");
                        return;
                }
        }
@@ -432,7 +432,7 @@ void GenericCommand_maplist(float request, float argc)
                                        {
                                                if (!fexists(strcat("maps/", argv(2), ".bsp")))
                                                {
-                                                       print("maplist: ERROR: ", argv(2), " does not exist!\n");
+                                                       LOG_INFO("maplist: ERROR: ", argv(2), " does not exist!\n");
                                                        break;
                                                }
 
@@ -493,13 +493,13 @@ void GenericCommand_maplist(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2maplist^7\n");
+                       LOG_INFO("Incorrect parameters for ^2maplist^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " maplist action [map]\n"));
-                       print("  Where 'action' is the command to complete,\n");
-                       print("  and 'map' is what it acts upon (if required).\n");
-                       print("  Full list of commands here: \"add, cleanup, remove, shuffle.\"\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " maplist action [map]\n"));
+                       LOG_INFO("  Where 'action' is the command to complete,\n");
+                       LOG_INFO("  and 'map' is what it acts upon (if required).\n");
+                       LOG_INFO("  Full list of commands here: \"add, cleanup, remove, shuffle.\"\n");
                        return;
                }
        }
@@ -518,8 +518,8 @@ void GenericCommand_nextframe(float request, float arguments, string command)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " nextframe command...\n"));
-                       print("  Where command will be executed next frame of this VM\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " nextframe command...\n"));
+                       LOG_INFO("  Where command will be executed next frame of this VM\n");
                        return;
                }
        }
@@ -553,12 +553,12 @@ void GenericCommand_removefromlist(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2removefromlist^7\n");
+                       LOG_INFO("Incorrect parameters for ^2removefromlist^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " removefromlist variable value\n"));
-                       print("  Where 'variable' is what cvar to remove 'value' from.\n");
-                       print("See also: ^2addtolist^7\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " removefromlist variable value\n"));
+                       LOG_INFO("  Where 'variable' is what cvar to remove 'value' from.\n");
+                       LOG_INFO("See also: ^2addtolist^7\n");
                        return;
                }
        }
@@ -571,7 +571,7 @@ void GenericCommand_restartnotifs(float request)
                case CMD_REQUEST_COMMAND:
                {
                        #ifndef MENUQC
-                       printf(
+                       LOG_INFOF(
                                strcat(
                                        "Restart_Notifications(): Restarting %d notifications... ",
                                        "Counts: MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d, MSG_CHOICE = %d\n"
@@ -592,7 +592,7 @@ void GenericCommand_restartnotifs(float request)
                        Destroy_All_Notifications();
                        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
                        #else
-                       print(_("Notification restart command only works with cl_cmd and sv_cmd.\n"));
+                       LOG_INFO(_("Notification restart command only works with cl_cmd and sv_cmd.\n"));
                        #endif
                        return;
                }
@@ -600,8 +600,8 @@ void GenericCommand_restartnotifs(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " restartnotifs"));
-                       print("  No arguments required.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " restartnotifs"));
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -617,9 +617,9 @@ void GenericCommand_settemp(float request, float argc)
                        {
                                float f = cvar_settemp(argv(1), argv(2));
                                if(f == 1)
-                                       dprint("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.\n");
                                else if(f == -1)
-                                       dprint("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), "\".\n");
                                // else cvar_settemp itself errors out
 
                                return;
@@ -627,12 +627,12 @@ void GenericCommand_settemp(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2settemp^7\n");
+                       LOG_INFO("Incorrect parameters for ^2settemp^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp \"cvar\" \"arguments\"\n"));
-                       print("  Where 'cvar' is the cvar you want to temporarily set with 'arguments'.\n");
-                       print("See also: ^2settemp_restore^7\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp \"cvar\" \"arguments\"\n"));
+                       LOG_INFO("  Where 'cvar' is the cvar you want to temporarily set with 'arguments'.\n");
+                       LOG_INFO("See also: ^2settemp_restore^7\n");
                        return;
                }
        }
@@ -647,9 +647,9 @@ void GenericCommand_settemp_restore(float request, float argc)
                        float i = cvar_settemp_restore();
 
                        if(i)
-                               dprint("Restored ", ftos(i), " temporary cvar settings to their original values.\n");
+                               LOG_TRACE("Restored ", ftos(i), " temporary cvar settings to their original values.\n");
                        else
-                               dprint("Nothing to restore.\n");
+                               LOG_TRACE("Nothing to restore.\n");
 
                        return;
                }
@@ -657,9 +657,9 @@ void GenericCommand_settemp_restore(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp_restore\n"));
-                       print("  No arguments required.\n");
-                       print("See also: ^2settemp^7\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " settemp_restore\n"));
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2settemp^7\n");
                        return;
                }
        }
@@ -685,7 +685,7 @@ void GenericCommand_runtest(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " [function to run]"));
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " [function to run]"));
                        return;
                }
        }
@@ -740,7 +740,7 @@ void GenericCommand_(float request)
 void GenericCommand_macro_help()
 {
        #define GENERIC_COMMAND(name,function,description) \
-               { print("  ^2", name, "^7: ", description, "\n"); }
+               { LOG_INFO("  ^2", name, "^7: ", description, "\n"); }
 
        GENERIC_COMMANDS(0, 0, "");
        #undef GENERIC_COMMAND
index c975f98ea988418b5d13501f7cb0b3f109bad3d9..1ca075bbbdf1f614652985039cf575182f13a149 100644 (file)
@@ -13,7 +13,7 @@ string rpn_pop()
                --rpn_sp;
                return rpn_stack[rpn_sp];
        } else {
-               print("rpn: stack underflow\n");
+               LOG_INFO("rpn: stack underflow\n");
                rpn_error = true;
                return "";
        }
@@ -24,7 +24,7 @@ void rpn_push(string s)
                rpn_stack[rpn_sp] = s;
                ++rpn_sp;
        } else {
-               print("rpn: stack overflow\n");
+               LOG_INFO("rpn: stack overflow\n");
                rpn_error = true;
        }
 }
@@ -33,7 +33,7 @@ string rpn_get()
        if(rpn_sp > 0) {
                return rpn_stack[rpn_sp - 1];
        } else {
-               print("rpn: empty stack\n");
+               LOG_INFO("rpn: empty stack\n");
                rpn_error = true;
                return "";
        }
@@ -43,7 +43,7 @@ void rpn_set(string s)
        if(rpn_sp > 0) {
                rpn_stack[rpn_sp - 1] = s;
        } else {
-               print("rpn: empty stack\n");
+               LOG_INFO("rpn: empty stack\n");
                rpn_error = true;
        }
 }
@@ -107,7 +107,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                }
                                                else
                                                {
-                                                       print("rpn: empty cvar name for 'def'\n");
+                                                       LOG_INFO("rpn: empty cvar name for 'def'\n");
                                                        rpn_error = true;
                                                }
                                        } else if(rpncmd == "defs" || rpncmd == "@") {
@@ -132,7 +132,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                }
                                                else
                                                {
-                                                       print("rpn: empty cvar name for 'defs'\n");
+                                                       LOG_INFO("rpn: empty cvar name for 'defs'\n");
                                                        rpn_error = true;
                                                }
                                        } else if(rpncmd == "load") {
@@ -288,7 +288,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                                db_put(rpn_db, "stack.pos", ftos(i-2));
                                                } else {
                                                        rpn_error = 1;
-                                                       print("rpn: database underflow\n");
+                                                       LOG_INFO("rpn: database underflow\n");
                                                }
                                        } else if(rpncmd == "dbget") {
 
@@ -298,7 +298,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                        rpn_push(db_get(rpn_db, strcat("stack.", ftos(i-1))));
                                                } else {
                                                        rpn_error = 1;
-                                                       print("rpn: database empty\n");
+                                                       LOG_INFO("rpn: database empty\n");
                                                }
                                        } else if(rpncmd == "dblen") {
                                                rpn_push(db_get(rpn_db, "stack.pointer"));
@@ -347,7 +347,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                if(!j)
                                                {
                                                        rpn_error = true;
-                                                       print("rpn: empty database\n");
+                                                       LOG_INFO("rpn: empty database\n");
                                                } else {
                                                        --j;
                                                        rpn_push(db_get(rpn_db, strcat("stack.", ftos(i))));
@@ -372,7 +372,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                        rpn_push(db_get(rpn_db, strcat("stack.", s)));
                                                } else {
                                                        rpn_error = 1;
-                                                       print("rpn: empty database\n");
+                                                       LOG_INFO("rpn: empty database\n");
                                                }
                                        } else if(rpncmd == "dbat") {
                                                rpn_push(db_get(rpn_db, "stack.pos"));
@@ -384,7 +384,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                {
                                                        if(i < 0 || i >= j)
                                                        {
-                                                               print("rpn: database cursor out of bounds\n");
+                                                               LOG_INFO("rpn: database cursor out of bounds\n");
                                                                rpn_error = true;
                                                        }
                                                        if(!rpn_error)
@@ -398,7 +398,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                if(!j)
                                                {
                                                        rpn_error = true;
-                                                       print("rpn: empty database, cannot move cursor\n");
+                                                       LOG_INFO("rpn: empty database, cannot move cursor\n");
                                                }
                                                if(!rpn_error)
                                                {
@@ -412,7 +412,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                        j = stof(db_get(rpn_db, "stack.pointer"));
                                                        if(i < 0 || i >= j)
                                                        {
-                                                               print("rpn: database cursor destination out of bounds\n");
+                                                               LOG_INFO("rpn: database cursor destination out of bounds\n");
                                                                rpn_error = true;
                                                        }
                                                        if(!rpn_error)
@@ -514,7 +514,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                {
                                                        if (!fexists(s))
                                                        {
-                                                               print("rpn: ERROR: ", s, " does not exist!\n");
+                                                               LOG_INFO("rpn: ERROR: ", s, " does not exist!\n");
                                                                rpn_error = true;
                                                        }
                                                }
@@ -553,7 +553,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                while(rpn_sp > 0)
                                {
                                        s = rpn_pop();
-                                       print("rpn: still on stack: ", s, "\n");
+                                       LOG_INFO("rpn: still on stack: ", s, "\n");
                                }
                        }
 
@@ -563,42 +563,42 @@ void GenericCommand_rpn(float request, float argc, string command)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " rpn EXPRESSION...\n"));
-                       print("    Operator description (x: string, s: set, f: float):\n");
-                       print("    x pop ----------------------------->     : removes the top\n");
-                       print("    x dup -----------------------------> x x : duplicates the top\n");
-                       print("    x x exch --------------------------> x x : swap the top two\n");
-                       print("    /cvarname load --------------------> x   : loads a cvar\n");
-                       print("    /cvarname x def ------------------->     : writes to a cvar\n");
-                       print("    f f add|sub|mul|div|mod|pow -------> f   : adds/... two numbers\n");
-                       print("    f f and|or|xor|bitand|bitor|bitxor > f   : logical and bitwise operations\n");
-                       print("    f f eq|ne|gt|ge|lt|le|max|min -----> f   : compares two numbers\n");
-                       print("    f neg|abs|sgn|rand|floor|ceil------> f   : negates/... a number\n");
-                       print("    f not|bitnot ----------------------> f   : logical and bitwise negation\n");
-                       print("    f exp|log|sin|cos -----------------> f   : exponential function & Co.\n");
-                       print("    f f f bound -----------------------> f   : bounds the middle number\n");
-                       print("    f1 f2 b when ----------------------> f   : f1 if b, f2 otherwise\n");
-                       print("    s s union|intersection|difference -> s   : set operations\n");
-                       print("    s shuffle -------------------------> s   : randomly arrange elements\n");
-                       print("    /key /value put ------------------->     : set a database key\n");
-                       print("    /key get --------------------------> s   : get a database value\n");
-                       print("    x dbpush -------------------------->     : pushes the top onto the database\n");
-                       print("    dbpop|dbget -----------------------> x   : removes/reads DB's top\n");
-                       print("    dblen|dbat ------------------------> f   : gets the DB's size/cursor pos\n");
-                       print("    dbclr ----------------------------->     : clear the DB\n");
-                       print("    s dbsave|dbload-------------------->     : save/load the DB to/from a file\n");
-                       print("    x dbins --------------------------->     : moves the top into the DB\n");
-                       print("    dbext|dbread ----------------------> x   : extract/get from the DB's cursor\n");
-                       print("    f dbmov|dbgoto -------------------->     : move or set the DB's cursor\n");
-                       print("    s localtime -----------------------> s   : formats the current local time\n");
-                       print("    s gmtime --------------------------> s   : formats the current UTC time\n");
-                       print("    time ------------------------------> f   : seconds since VM start\n");
-                       print("    s /MD4 digest ---------------------> s   : MD4 digest\n");
-                       print("    s /SHA256 digest ------------------> s   : SHA256 digest\n");
-                       print("    s /formatstring sprintf1s ---------> s   : sprintf with 1 string (pad, cut)\n");
-                       print("    s eval ---------------------------->     : does something eval\n");
-                       print("    Set operations operate on 'such''strings'.\n");
-                       print("    Unknown tokens insert their cvar value.\n");
+                       LOG_INFO(strcat("\nUsage:^3 ", GetProgramCommandPrefix(), " rpn EXPRESSION...\n"));
+                       LOG_INFO("    Operator description (x: string, s: set, f: float):\n");
+                       LOG_INFO("    x pop ----------------------------->     : removes the top\n");
+                       LOG_INFO("    x dup -----------------------------> x x : duplicates the top\n");
+                       LOG_INFO("    x x exch --------------------------> x x : swap the top two\n");
+                       LOG_INFO("    /cvarname load --------------------> x   : loads a cvar\n");
+                       LOG_INFO("    /cvarname x def ------------------->     : writes to a cvar\n");
+                       LOG_INFO("    f f add|sub|mul|div|mod|pow -------> f   : adds/... two numbers\n");
+                       LOG_INFO("    f f and|or|xor|bitand|bitor|bitxor > f   : logical and bitwise operations\n");
+                       LOG_INFO("    f f eq|ne|gt|ge|lt|le|max|min -----> f   : compares two numbers\n");
+                       LOG_INFO("    f neg|abs|sgn|rand|floor|ceil------> f   : negates/... a number\n");
+                       LOG_INFO("    f not|bitnot ----------------------> f   : logical and bitwise negation\n");
+                       LOG_INFO("    f exp|log|sin|cos -----------------> f   : exponential function & Co.\n");
+                       LOG_INFO("    f f f bound -----------------------> f   : bounds the middle number\n");
+                       LOG_INFO("    f1 f2 b when ----------------------> f   : f1 if b, f2 otherwise\n");
+                       LOG_INFO("    s s union|intersection|difference -> s   : set operations\n");
+                       LOG_INFO("    s shuffle -------------------------> s   : randomly arrange elements\n");
+                       LOG_INFO("    /key /value put ------------------->     : set a database key\n");
+                       LOG_INFO("    /key get --------------------------> s   : get a database value\n");
+                       LOG_INFO("    x dbpush -------------------------->     : pushes the top onto the database\n");
+                       LOG_INFO("    dbpop|dbget -----------------------> x   : removes/reads DB's top\n");
+                       LOG_INFO("    dblen|dbat ------------------------> f   : gets the DB's size/cursor pos\n");
+                       LOG_INFO("    dbclr ----------------------------->     : clear the DB\n");
+                       LOG_INFO("    s dbsave|dbload-------------------->     : save/load the DB to/from a file\n");
+                       LOG_INFO("    x dbins --------------------------->     : moves the top into the DB\n");
+                       LOG_INFO("    dbext|dbread ----------------------> x   : extract/get from the DB's cursor\n");
+                       LOG_INFO("    f dbmov|dbgoto -------------------->     : move or set the DB's cursor\n");
+                       LOG_INFO("    s localtime -----------------------> s   : formats the current local time\n");
+                       LOG_INFO("    s gmtime --------------------------> s   : formats the current UTC time\n");
+                       LOG_INFO("    time ------------------------------> f   : seconds since VM start\n");
+                       LOG_INFO("    s /MD4 digest ---------------------> s   : MD4 digest\n");
+                       LOG_INFO("    s /SHA256 digest ------------------> s   : SHA256 digest\n");
+                       LOG_INFO("    s /formatstring sprintf1s ---------> s   : sprintf with 1 string (pad, cut)\n");
+                       LOG_INFO("    s eval ---------------------------->     : does something eval\n");
+                       LOG_INFO("    Set operations operate on 'such''strings'.\n");
+                       LOG_INFO("    Unknown tokens insert their cvar value.\n");
                        return;
                }
        }
index 790d8a7db6ce3ebc55f6a9ef0618517051d80cf6..e6f1b6656779a3af7bda316ce67d9ec4e1ae3781 100644 (file)
@@ -145,13 +145,13 @@ void RegisterEffects_First()
     #define dedi ""
     #endif
 
-    dprintf("Beginning effect initialization on %s%s program...\n", dedi, PROGNAME);
+    LOG_TRACEF("Beginning effect initialization on %s%s program...\n", dedi, PROGNAME);
     #undef dedi
 }
 
 void RegisterEffects_Done()
 {
-    dprint("Effects initialization successful!\n");
+    LOG_TRACE("Effects initialization successful!\n");
 }
 
 // NOW we actually activate the declarations
index 8b0d43305d9b243eb8eec33028079ebc4b125745..9b4013405d6740e7db8b23ac5a463a2bcc0e6e51 100644 (file)
@@ -19,7 +19,7 @@ void Inventory_Read(Inventory data)
         .int fld = inv_items[i];
         int prev = data.(fld);
         int next = data.(fld) = ReadByte();
-        dprintf("%s: %.0f -> %.0f\n", ITEMS[i].m_name, prev, next);
+        LOG_TRACEF("%s: %.0f -> %.0f\n", ITEMS[i].m_name, prev, next);
     ));
 }
 #endif
index bddf75b04193361e1b7ae80906397656926dce9c..ceb9a0aa4df1192c904706a711d0922f92d463b5 100644 (file)
@@ -12,7 +12,7 @@ CLASS(GameItem, Object)
     METHOD(GameItem, display, void(entity this, void(string name, string icon) returns)) {
         returns(this.m_name, this.m_icon ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.m_icon) : string_null);
     }
-    METHOD(GameItem, show, void(entity this)) { print("A game item\n"); }
+    METHOD(GameItem, show, void(entity this)) { LOG_INFO("A game item\n"); }
     void ITEM_HANDLE(Show, entity this) { this.show(this); }
 ENDCLASS(GameItem)
 
index 35aac2bff729080e975238591f69bcda09fae716..ade99c543aeacb710cabd4b9194d5de7bd6fc753 100644 (file)
@@ -4,7 +4,7 @@
 bool ITEM_HANDLE(Pickup, entity this, entity item, entity player) {
     bool b = this.giveTo(this, item, player);
     if (b) {
-        dprintf("entity %i picked up %s\n", player, this.m_name);
+        LOG_TRACEF("entity %i picked up %s\n", player, this.m_name);
         player.inventory.inv_items[this.m_id]++;
         Inventory_update(player);
     }
index 643617068c490eec99fb279fdf43958d9d4c1e49..793230e359f831222ad7c309a7a7b001cbe332a0 100644 (file)
@@ -6,7 +6,7 @@ CLASS(Pickup, GameItem)
     ATTRIB(Pickup, m_sound, string, "misc/itempickup.wav")
     ATTRIB(Pickup, m_name, string, string_null)
     METHOD(Pickup, show, void(entity this));
-    void Pickup_show(entity this) { printf("%s: %s\n", etos(this), this.m_name); }
+    void Pickup_show(entity this) { LOG_INFOF("%s: %s\n", etos(this), this.m_name); }
 #ifdef SVQC
     ATTRIB(Pickup, m_botvalue, int, 0)
     ATTRIB(Pickup, m_itemflags, int, 0)
index 0b851d53b0c5299c7625055d6f470f7925b90564..eff61dbdf713621fdb950acb44f4035408068c99 100644 (file)
@@ -169,7 +169,7 @@ float MapInfo_FilterGametype(int pGametype, int pFeatures, int pFlagsRequired, i
                if(MapInfo_Get_ByName(_MapInfo_GlobItem(i), 1, 0) == 2) // if we generated one... BAIL OUT and let the caller continue in the next frame.
                        if(pAbortOnGenerate)
                        {
-                               dprint("Autogenerated a .mapinfo, doing the rest later.\n");
+                               LOG_TRACE("Autogenerated a .mapinfo, doing the rest later.\n");
                                MapInfo_progress = i / _MapInfo_globcount;
                                return 0;
                        }
@@ -287,7 +287,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        }
        if(fh < 0)
                return 0;
-       print("Analyzing ", fn, " to generate initial mapinfo\n");
+       LOG_INFO("Analyzing ", fn, " to generate initial mapinfo\n");
 
        inWorldspawn = 2;
        MapInfo_Map_flags = 0;
@@ -395,7 +395,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
        }
        if(inWorldspawn)
        {
-               print(fn, " ended still in worldspawn, BUG\n");
+               LOG_INFO(fn, " ended still in worldspawn, BUG\n");
                return 0;
        }
        diameter = vlen(mapMaxs - mapMins);
@@ -428,9 +428,9 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
                MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CTS;
        }
 
-       dprint("-> diameter ",    ftos(diameter));
-       dprint(";  spawnpoints ", ftos(spawnpoints));
-       dprint(";  modes ",       ftos(MapInfo_Map_supportedGametypes), "\n");
+       LOG_TRACE("-> diameter ",    ftos(diameter));
+       LOG_TRACE(";  spawnpoints ", ftos(spawnpoints));
+       LOG_TRACE(";  modes ",       ftos(MapInfo_Map_supportedGametypes), "\n");
 
        fclose(fh);
 
@@ -650,7 +650,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType)
                p = strstrofs(sa, "=", 0);
                if(p < 0)
                {
-                       print("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
+                       LOG_INFO("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
                        continue;
                }
                k = substring(sa, 0, p);
@@ -691,7 +691,7 @@ void _MapInfo_Map_ApplyGametypeEx(string s, int pWantedType, int pThisType)
                }
                else
                {
-                       print("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
+                       LOG_INFO("Invalid gametype setting in mapinfo for gametype ", MapInfo_Type_ToString(pWantedType), ": ", sa, "\n");
                }
        }
 
@@ -711,39 +711,39 @@ float MapInfo_Type_FromString(string t)
 {
        if(t == "nexball")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "nb";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "freezetag")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "ft";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "keepaway")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "ka";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "invasion")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "inv";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "assault")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "as";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "race")
        {
-               print("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
+               LOG_INFO("MapInfo_Type_FromString (probably ", MapInfo_Map_bspname, "): using deprecated name '", t);
                t = "rc";
-               print("'. Should use '", t, "'.\n");
+               LOG_INFO("'. Should use '", t, "'.\n");
        }
        if(t == "all")
                return MAPINFO_TYPE_ALL;
@@ -811,7 +811,7 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
                {
                        fh = fopen(s, FILE_READ);
                        if(fh < 0)
-                               print("Map ", pFilename, " references not existing config file ", s, "\n");
+                               LOG_INFO("Map ", pFilename, " references not existing config file ", s, "\n");
                        else
                        {
                                for (;;)
@@ -840,23 +840,23 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
                        }
                }
                else
-                       print("Map ", pFilename, " uses too many levels of inclusion\n");
+                       LOG_INFO("Map ", pFilename, " uses too many levels of inclusion\n");
        }
        else if(t == "")
-               print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if (!cvar_value_issafe(t))
-               print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if (!cvar_value_issafe(s))
-               print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if(matchacl(MAPINFO_SETTEMP_ACL_SYSTEM, t) <= 0)
-               print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
        else if(matchacl(acl, t) <= 0)
-               print("Map ", pFilename, " contains a denied setting, ignored\n");
+               LOG_INFO("Map ", pFilename, " contains a denied setting, ignored\n");
        else
        {
                if(type == 0) // server set
                {
-                       dprint("Applying temporary setting ", t, " := ", s, "\n");
+                       LOG_TRACE("Applying temporary setting ", t, " := ", s, "\n");
                        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
@@ -864,7 +864,7 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
                }
                else
                {
-                       dprint("Applying temporary client setting ", t, " := ", s, "\n");
+                       LOG_TRACE("Applying temporary client setting ", t, " := ", s, "\n");
                        MapInfo_Map_clientstuff = strcat(
                                        MapInfo_Map_clientstuff, "cl_cmd settemp \"", t, "\" \"", s, "\"\n"
                                        );
@@ -911,7 +911,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
 
        if(strstrofs(pFilename, "/", 0) >= 0)
        {
-               print("Invalid character in map name, ignored\n");
+               LOG_INFO("Invalid character in map name, ignored\n");
                return 0;
        }
 
@@ -1001,7 +1001,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                                error("... but I just wrote it!");
                }
 
-               print("WARNING: autogenerated mapinfo file ", fn, " has been loaded; please edit that file and move it to maps/", pFilename, ".mapinfo\n");
+               LOG_INFO("WARNING: autogenerated mapinfo file ", fn, " has been loaded; please edit that file and move it to maps/", pFilename, ".mapinfo\n");
        }
 
        _MapInfo_Map_Reset();
@@ -1040,7 +1040,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        else if(t == "monsters") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_MONSTERS;
                        else if(t == "new_toys") MapInfo_Map_supportedFeatures |= MAPINFO_FEATURE_WEAPONS;
                        else
-                               dprint("Map ", pFilename, " supports unknown feature ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " supports unknown feature ", t, ", ignored\n");
                }
                else if(t == "hidden")
                {
@@ -1062,11 +1062,11 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                {
                        t = car(s); s = cdr(s);
                        f = MapInfo_Type_FromString(t);
-                       dprint("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n");
+                       LOG_TRACE("Map ", pFilename, " contains the legacy 'type' keyword which is deprecated and will be removed in the future. Please migrate the mapinfo file to 'gametype'.\n");
                        if(f)
                                _MapInfo_Map_ApplyGametype (s, pGametypeToSet, f, true);
                        else
-                               dprint("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
                }
                else if(t == "gametype")
                {
@@ -1075,7 +1075,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        if(f)
                                _MapInfo_Map_ApplyGametypeEx (s, pGametypeToSet, f);
                        else
-                               dprint("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " supports unknown game type ", t, ", ignored\n");
                }
                else if(t == "size")
                {
@@ -1086,16 +1086,16 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        t = car(s); s = cdr(s); d = stof(t);
                        t = car(s); s = cdr(s); e = stof(t);
                        if(s == "")
-                               print("Map ", pFilename, " contains an incorrect size line (not enough params), syntax: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
+                               LOG_INFO("Map ", pFilename, " contains an incorrect size line (not enough params), syntax: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
                        else
                        {
                                t = car(s); s = cdr(s); f = stof(t);
                                if(s != "")
-                                       print("Map ", pFilename, " contains an incorrect size line (too many params), syntax: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
+                                       LOG_INFO("Map ", pFilename, " contains an incorrect size line (too many params), syntax: size mins_x mins_y mins_z maxs_x maxs_y maxs_z\n");
                                else
                                {
                                        if(a >= d || b >= e || c >= f)
-                                               print("Map ", pFilename, " contains an incorrect size line, mins have to be < maxs\n");
+                                               LOG_INFO("Map ", pFilename, " contains an incorrect size line, mins have to be < maxs\n");
                                        else
                                        {
                                                MapInfo_Map_mins.x = a;
@@ -1120,7 +1120,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        }
                        else
                        {
-                               dprint("Map ", pFilename, " has a setting for unknown game type ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " has a setting for unknown game type ", t, ", ignored\n");
                        }
                }
                else if(t == "clientsettemp_for_type")
@@ -1135,13 +1135,13 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        }
                        else
                        {
-                               dprint("Map ", pFilename, " has a client setting for unknown game type ", t, ", ignored\n");
+                               LOG_TRACE("Map ", pFilename, " has a client setting for unknown game type ", t, ", ignored\n");
                        }
                }
                else if(t == "fog")
                {
                        if (!cvar_value_issafe(s))
-                               print("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n");
+                               LOG_INFO("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n");
                        else
                                MapInfo_Map_fog = s;
                }
@@ -1157,7 +1157,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        if(pGametypeToSet)
                        {
                                if (!cvar_value_issafe(t))
-                                       print("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n");
+                                       LOG_INFO("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n");
                                else
                                        MapInfo_Map_clientstuff = strcat(
                                                MapInfo_Map_clientstuff, "cd loop \"", t, "\"\n"
@@ -1165,7 +1165,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
                        }
                }
                else
-                       dprint("Map ", pFilename, " provides unknown info item ", t, ", ignored\n");
+                       LOG_TRACE("Map ", pFilename, " provides unknown info item ", t, ", ignored\n");
        }
        fclose(fh);
 
@@ -1179,7 +1179,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, int p
        MapInfo_Cache_Store();
        if(MapInfo_Map_supportedGametypes != 0)
                return r;
-       dprint("Map ", pFilename, " supports no game types, ignored\n");
+       LOG_TRACE("Map ", pFilename, " supports no game types, ignored\n");
        return 0;
 }
 float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, int pGametypeToSet)
@@ -1371,14 +1371,14 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn
        {
                if(cvar("g_mapinfo_allow_unsupported_modes_and_let_stuff_break"))
                {
-                       print("EMERGENCY: can't play the selected map in the given game mode. Working with only the override settings.\n");
+                       LOG_INFO("EMERGENCY: can't play the selected map in the given game mode. Working with only the override settings.\n");
                        _MapInfo_Map_ApplyGametypeEx("", t, t);
                        return; // do not call Get_ByName!
                }
 
                if(MapInfo_Map_supportedGametypes == 0)
                {
-                       print("Mapinfo system is not functional at all. Assuming deathmatch.\n");
+                       LOG_INFO("Mapinfo system is not functional at all. Assuming deathmatch.\n");
                        MapInfo_Map_supportedGametypes = MAPINFO_TYPE_DEATHMATCH;
                        MapInfo_LoadMapSettings_SaveGameType(MAPINFO_TYPE_DEATHMATCH);
                        _MapInfo_Map_ApplyGametypeEx("", MAPINFO_TYPE_DEATHMATCH, MAPINFO_TYPE_DEATHMATCH);
@@ -1393,7 +1393,7 @@ void MapInfo_LoadMapSettings(string s) // to be called from worldspawn
                }
 
                // t is now a supported mode!
-               print("EMERGENCY: can't play the selected map in the given game mode. Falling back to a supported mode.\n");
+               LOG_INFO("EMERGENCY: can't play the selected map in the given game mode. Falling back to a supported mode.\n");
                MapInfo_LoadMapSettings_SaveGameType(t);
        }
        MapInfo_Get_ByName(s, 1, t);
index 2fefd53227580bb3204bb56623a02a01df4f3272..3a1cc86744c16f9ea93f40c0a3ce22801cd874d6 100644 (file)
@@ -95,7 +95,7 @@ MINIGAME_SIMPLELINKED_ENTITIES
 
 void minigame_autoclean_entity(entity e)
 {
-       dprint("CL Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
+       LOG_TRACE("CL Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
        remove(e);
 }
 
@@ -142,7 +142,7 @@ void activate_minigame(entity minigame)
        
        if ( !minigame.descriptor || minigame.classname != "minigame" )
        {
-               dprint("Trying to activate unregistered minigame ",minigame.netname," in client\n");
+               LOG_TRACE("Trying to activate unregistered minigame ",minigame.netname," in client\n");
                return;
        }
        
@@ -197,7 +197,7 @@ void minigame_read_owner()
                self.owner = find(self.owner,netname,owner_name);
        while ( self.owner && self.owner.classname != "minigame" );
        if ( !self.owner )
-               dprint("Got a minigame entity without a minigame!\n");
+               LOG_TRACE("Got a minigame entity without a minigame!\n");
 }
 void ent_read_minigame()
 {
@@ -219,7 +219,7 @@ void ent_read_minigame()
                        self.entremove = minigame_entremove;
                        self.descriptor = minigame_get_descriptor(ReadString_Raw());
                        if ( !self.descriptor )
-                               dprint("Got a minigame without a client-side descriptor!\n");
+                               LOG_TRACE("Got a minigame without a client-side descriptor!\n");
                        else
                                self.minigame_event = self.descriptor.minigame_event;
                }
@@ -235,7 +235,7 @@ void ent_read_minigame()
                        minigame_read_owner();
                        float ent = ReadLong();
                        self.minigame_playerslot = ent;
-                       dprint("Player: ",GetPlayerName(ent-1),"\n");
+                       LOG_TRACE("Player: ",GetPlayerName(ent-1),"\n");
                        
                        activate = (ent == player_localnum+1 && self.owner && self.owner != active_minigame);
                        
@@ -258,9 +258,9 @@ void ent_read_minigame()
 
        if ( sf & MINIG_SF_CREATE )
        {
-               dprint("CL Reading entity: ",ftos(num_for_edict(self)),
+               LOG_TRACE("CL Reading entity: ",ftos(num_for_edict(self)),
                        " classname:",self.classname," enttype:",ftos(self.enttype) );
-               dprint(" sf:",ftos(sf)," netname:",self.netname,"\n\n");
+               LOG_TRACE(" sf:",ftos(sf)," netname:",self.netname,"\n\n");
        }
 }
 #undef ReadString
index fc5df6bc5f481d2db9734e18f67b0a97f47eecd6..b7ad467b8c2728ec128d8835c23157007540121f 100644 (file)
@@ -368,7 +368,7 @@ int nmm_server_event(entity minigame, string event, ...)
                                minigame.SendFlags |= MINIG_SF_UPDATE;
                        }
                        else
-                               dprint("Invalid move: ",...(2,string),"\n");
+                               LOG_TRACE("Invalid move: ",...(2,string),"\n");
                        return 1;
                }
        }
index 644bd8ec6660df141d143cbf45ae531884b60020..18a64e4264b39fd4317a8a64f3482f0e7d0aa160 100644 (file)
@@ -419,7 +419,7 @@ int ttt_ai_random(int piecemask)
                f <<= 1;
        }
        
-       dprint(sprintf("TTT AI: selected %x from %x\n",
+       LOG_TRACE(sprintf("TTT AI: selected %x from %x\n",
                        RandomSelection_chosen_float, piecemask) );
        return RandomSelection_chosen_float;
 }
@@ -437,7 +437,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);
-       dprint(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)\n",piecemask,r, r&piecemask_free));
        r &= piecemask_free;
        return ttt_ai_random(r);
 }
@@ -450,15 +450,15 @@ string ttt_ai_choose_simple(int piecemask_self, int piecemask_opponent, int piec
 {
        int move = 0;
        
-       dprint("TTT AI: checking winning move\n");
+       LOG_TRACE("TTT AI: checking winning move\n");
        if (( move = ttt_ai_block3(piecemask_self,piecemask_free) ))
                return ttt_ai_piece_flag2pos(move); // place winning move
                
-       dprint("TTT AI: checking opponent's winning move\n");
+       LOG_TRACE("TTT AI: checking opponent's winning move\n");
        if (( move = ttt_ai_block3(piecemask_opponent,piecemask_free) ))
                return ttt_ai_piece_flag2pos(move); // block opponent
                
-       dprint("TTT AI: random move\n");
+       LOG_TRACE("TTT AI: random move\n");
        return ttt_ai_piece_flag2pos(ttt_ai_random(piecemask_free));
 }
 
@@ -508,12 +508,12 @@ void ttt_aimove(entity minigame)
                }
                        
                // TODO multiple AI difficulties
-               dprint(sprintf("TTT AI: self: %x opponent: %x free: %x\n",
+               LOG_TRACE(sprintf("TTT AI: self: %x opponent: %x free: %x\n",
                                piecemask_self, piecemask_opponent, piecemask_free));
                pos = ttt_ai_choose_simple(piecemask_self, piecemask_opponent, piecemask_free);
-               dprint("TTT AI: chosen move: ",pos,"\n\n");
+               LOG_TRACE("TTT AI: chosen move: ",pos,"\n\n");
                if ( !pos )
-                       dprint("Tic Tac Toe AI has derped!\n");
+                       LOG_TRACE("Tic Tac Toe AI has derped!\n");
                else
                        ttt_move(minigame,aiplayer,pos);
        }
@@ -688,4 +688,4 @@ int ttt_client_event(entity minigame, string event, ...)
        return false;
 }
 
-#endif
\ No newline at end of file
+#endif
index 157471cbd54f26be4def2d61b932580b5e132686..feb4b02944874bc692c0672b90881d6dee8094b9 100644 (file)
@@ -183,7 +183,7 @@ entity start_minigame(entity player, string minigame )
                GameLogEcho(strcat(":minigame:start:",minig.netname));
                if ( ! minigame_addplayer(minig,player) )
                {
-                       dprint("Minigame ",minig.netname," rejected the first player join!\n");
+                       LOG_TRACE("Minigame ",minig.netname," rejected the first player join!\n");
                        end_minigame(minig);
                        return world;
                }
@@ -242,7 +242,7 @@ void end_minigame(entity minigame_session)
        while( (e = findentity(e, owner, minigame_session)) )
                if ( e.minigame_autoclean )
                {
-                       dprint("SV Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
+                       LOG_TRACE("SV Auto-cleaned: ",ftos(num_for_edict(e)), " (",e.classname,")\n");
                        remove(e);
                }
        
@@ -427,4 +427,4 @@ void ClientCommand_minigame(int request, int argc, string command)
        sprint(self, "  Leave the current minigame\n");
        sprint(self, "Usage:^3 cmd minigame invite <player>\n");
        sprint(self, "  Invite the given player to join you in a minigame\n");
-}
\ No newline at end of file
+}
index 6a3553b1cc3b141f97811f7a537312a2eac289a8..020355077f39c2e2bb267e9c48db5e4a1d08a109 100644 (file)
@@ -211,7 +211,7 @@ void PrecacheMonsterSounds(string f)
        {
                if(tokenize_console(s) != 3)
                {
-                       dprint("Invalid sound info line: ", s, "\n");
+                       LOG_TRACE("Invalid sound info line: ", s, "\n");
                        continue;
                }
                PrecacheGlobalSound(strcat(argv(1), " ", argv(2)));
@@ -266,7 +266,7 @@ float LoadMonsterSounds(string f, float first)
        fh = fopen(f, FILE_READ);
        if(fh < 0)
        {
-               dprint("Monster sound file not found: ", f, "\n");
+               LOG_TRACE("Monster sound file not found: ", f, "\n");
                return 0;
        }
        while((s = fgets(fh)))
index 90be7738c2b4a9133babce082edf5d54b61508a6..e92e81a0dad19b2757fbc534c61659427295788a 100644 (file)
@@ -452,11 +452,11 @@ bool _Movetype_UnstickEntity()  // SV_UnstickEntity
                if(!_Movetype_TestEntityPosition('0 0 -1' * i)) goto success;
                if(!_Movetype_TestEntityPosition('0 0 1' * i)) goto success;
        }
-       dprintf("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
+       LOG_TRACEF("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n",
                num_for_edict(self), self.classname, vtos(self.move_origin));
        return false;
        : success;
-       dprintf("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
+       LOG_TRACEF("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n",
                num_for_edict(self), self.classname, vtos(self.move_origin));
        _Movetype_LinkEdict(true);
        return true;
index 1f563f58ddcf51a813dbf2e08e4c197b9ccb1fdd..954033edbe9f59256914958a0963b2fd29f6b90b 100644 (file)
@@ -26,7 +26,7 @@ void _Movetype_PushMove(float dt)  // SV_PushMove
                        _Movetype_LinkEdict(true);
                        return;
                default:
-                       dprintf("_Movetype_PushMove: entity %e, unrecognized solid type %d\n", self, self.solid);
+                       LOG_TRACEF("_Movetype_PushMove: entity %e, unrecognized solid type %d\n", self, self.solid);
                        return;
        }
 
index baa891c939825adc1d63ce75e3393df80d3bfc58..4c39d6f7d5a4f32b46ef32e20fe90910a9b9eaee 100644 (file)
@@ -262,7 +262,7 @@ STATIC_INIT(Mutators) {
 #define MUTATOR_HOOK(cb, func, order) do {                              \
     MUTATOR_ONADD {                                                     \
         if (!CallbackChain_Add(HOOK_##cb, CALLBACK_##func, order)) {    \
-            print("HOOK FAILED: ", #cb, ":", #func, "\n");              \
+            LOG_INFO("HOOK FAILED: ", #cb, ":", #func, "\n");              \
             return true;                                                \
         }                                                               \
     }                                                                   \
index c5fa1ac00bf771cc0fa4a832d4e679e1c3327682..8673b96b35717946d6ce952dc62afe25a564035b 100644 (file)
@@ -545,7 +545,7 @@ void Draw_WaypointSprite()
     if (rgb == '0 0 0')
     {
         self.teamradar_color = '1 0 1';
-        printf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
+        LOG_INFOF("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
     }
 
     if (time - floor(time) > 0.5)
index 03005da3432bfea9fe1778c78f1eb1746b0fcdeb..5145e5340cff8f3a78748bb88c1d107e90ac8e08 100644 (file)
@@ -296,7 +296,7 @@ string Process_Notif_Line(
        // done to both MSG_INFO and MSG_CENTER
        if(substring(input, (strlen(input) - 1), 1) == "\n")
        {
-               printf(
+               LOG_INFOF(
                        strcat(
                                "^1TRAILING NEW LINE AT END OF NOTIFICATION: ",
                                "^7net_type = %s, net_name = %s, string = %s.\n"
@@ -331,7 +331,7 @@ string Process_Notif_Args(
                        {
                                if(sel_num == NOTIF_MAX_ARGS)
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
                                                        "^7net_type = %s, net_name = %s, max args = %d.\n"
@@ -363,7 +363,7 @@ string Process_Notif_Args(
                                        #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
                                                                "^7net_type = %s, net_name = %s, args arg = '%s'.\n"
@@ -382,7 +382,7 @@ string Process_Notif_Args(
                        {
                                if(sel_num == NOTIF_MAX_HUDARGS)
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
                                                        "^7net_type = %s, net_name = %s, max hudargs = %d.\n"
@@ -414,7 +414,7 @@ string Process_Notif_Args(
                                        #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
                                                                "^7net_type = %s, net_name = %s, hudargs arg = '%s'.\n"
@@ -433,7 +433,7 @@ string Process_Notif_Args(
                        {
                                if(sel_num == NOTIF_MAX_DURCNT)
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
                                                        "^7net_type = %s, net_name = %s, max durcnt = %d.\n"
@@ -468,7 +468,7 @@ string Process_Notif_Args(
                                                if(ftos(stof(selected)) != "") { ++sel_num; }
                                                else
                                                {
-                                                       printf(
+                                                       LOG_INFOF(
                                                                strcat(
                                                                        "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
                                                                        "^7net_type = %s, net_name = %s, durcnt arg = '%s'.\n"
@@ -606,7 +606,7 @@ void Create_Notification_Entity(
                                }
                                else
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION WITH NO SOUND: ",
                                                        "^7net_type = %s, net_name = %s.\n"
@@ -653,7 +653,7 @@ void Create_Notification_Entity(
                                        }
                                        else if((hudargs == "") && (durcnt ==""))
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION HAS ARG COUNTS BUT NO ARGS OR HUDARGS OR DURCNT: ",
                                                                "^7net_type = %s, net_name = %s, strnum = %d, flnum = %d\n"
@@ -687,7 +687,7 @@ void Create_Notification_Entity(
                                        if(icon != "") { notif.nent_icon = strzone(icon); }
                                        else
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION HAS HUDARGS BUT NO ICON: ",
                                                                "^7net_type = %s, net_name = %s.\n"
@@ -700,7 +700,7 @@ void Create_Notification_Entity(
                                }
                                else if(icon != "")
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1NOTIFICATION HAS ICON BUT NO HUDARGS: ",
                                                        "^7net_type = %s, net_name = %s.\n"
@@ -719,7 +719,7 @@ void Create_Notification_Entity(
                                        if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
                                        else
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION HAS DURCNT BUT NO CPID: ",
                                                                "^7net_type = %s, net_name = %s.\n"
@@ -761,7 +761,7 @@ void Create_Notification_Entity(
                                // Check to make sure a string was chosen
                                if(notif.nent_string == "")
                                {
-                                       printf(
+                                       LOG_INFOF(
                                                strcat(
                                                        "^1EMPTY NOTIFICATION: ",
                                                        "^7net_type = %s, net_name = %s.\n"
@@ -781,7 +781,7 @@ void Create_Notification_Entity(
                        // Set MSG_MULTI string/float counts
                        if((anncename == NO_MSG) && (infoname == NO_MSG) && (centername == NO_MSG))
                        {
-                               printf(
+                               LOG_INFOF(
                                        strcat(
                                                "^1NOTIFICATION WITH NO SUBCALLS: ",
                                                "^7net_type = %s, net_name = %s.\n"
@@ -825,7 +825,7 @@ void Create_Notification_Entity(
                {
                        if((chtype == NO_MSG) || (optiona == NO_MSG) || (optionb == NO_MSG))
                        {
-                               printf(
+                               LOG_INFOF(
                                        strcat(
                                                "^1NOTIFICATION IS MISSING CHOICE PARAMS: ",
                                                "^7net_type = %s, net_name = %s.\n"
@@ -872,7 +872,7 @@ void Create_Notification_Entity(
 
                                        default:
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        strcat(
                                                                "^1NOTIFICATION WITH IMPROPER TYPE: ",
                                                                "^7net_type = %d, net_name = %s.\n"
@@ -915,7 +915,7 @@ void Create_Notification_Entity(
 
                default:
                {
-                       printf(
+                       LOG_INFOF(
                                strcat(
                                        "^1NOTIFICATION WITH IMPROPER TYPE: ",
                                        "^7net_type = %d, net_name = %s.\n"
@@ -962,7 +962,7 @@ void Dump_Notifications(float fh, float alsoprint)
 {
        #define NOTIF_WRITE(a) { \
                fputs(fh, a); \
-               if(alsoprint) { print(a); } }
+               if(alsoprint) { LOG_INFO(a); } }
        #define NOTIF_WRITE_ENTITY(description) { \
                notif_msg = \
                        sprintf( \
@@ -1193,8 +1193,8 @@ void Debug_Notification(string input)
 {
        switch(autocvar_notification_debug)
        {
-               case 1: { dprint(input); break; }
-               case 2: { print(input); break; }
+               case 1: { LOG_TRACE(input); break; }
+               case 2: { LOG_INFO(input); break; }
        }
 }
 #endif
@@ -1550,7 +1550,7 @@ void Local_Notification(int net_type, int net_name, ...count)
 
                case MSG_INFO:
                {
-                       print(
+                       LOG_INFO(
                                Local_Notification_sprintf(
                                        notif.nent_string,
                                        notif.nent_args,
index cde5576897f502d0b890d6085a51cf035dc70f9e..26c77b2a5871aa04a324bb012225a8ff18f00a33 100644 (file)
@@ -1701,7 +1701,7 @@ void RegisterNotifications_First()
     #define dedi ""
     #endif
 
-    printf("Beginning notification initialization on %s%s program...\n", dedi, PROGNAME);
+    LOG_INFOF("Beginning notification initialization on %s%s program...\n", dedi, PROGNAME);
     #undef dedi
 
     // maybe do another implementation of this with checksums? for now, we don't need versioning
@@ -1727,9 +1727,9 @@ void RegisterNotifications_Done()
         if(autocvar_notification_errors_are_fatal)
             error("Notification initialization failed! Read above and fix the errors!\n");
         else
-            print("Notification initialization failed! Read above and fix the errors!\n");
+            LOG_INFO("Notification initialization failed! Read above and fix the errors!\n");
     }
-    else { print("Notification initialization successful!\n"); }
+    else { LOG_INFO("Notification initialization successful!\n"); }
 }
 
 // NOW we actually activate the declarations
index e5b83443fbcd3c28aecce9276cd006e5eead2e74..71e2aa2bafaa8b5d524bfd0ef6fa8443cc6d9f88 100644 (file)
@@ -624,7 +624,7 @@ bool PlayerJump (void)
        {
 #ifdef SVQC
                if(autocvar_speedmeter)
-                       dprint(strcat("landing velocity: ", vtos(self.velocity), " (abs: ", ftos(vlen(self.velocity)), ")\n"));
+                       LOG_TRACE(strcat("landing velocity: ", vtos(self.velocity), " (abs: ", ftos(vlen(self.velocity)), ")\n"));
 #endif
                if(self.lastground < time - 0.3)
                {
@@ -633,7 +633,7 @@ bool PlayerJump (void)
                }
 #ifdef SVQC
                if(self.jumppadcount > 1)
-                       dprint(strcat(ftos(self.jumppadcount), "x jumppad combo\n"));
+                       LOG_TRACE(strcat(ftos(self.jumppadcount), "x jumppad combo\n"));
                self.jumppadcount = 0;
 #endif
        }
@@ -970,7 +970,7 @@ void SpecialCommand()
        TetrisImpulse();
 #else
        if (!CheatImpulse(99))
-               print("A hollow voice says \"Plugh\".\n");
+               LOG_INFO("A hollow voice says \"Plugh\".\n");
 #endif
 #endif
 }
@@ -1483,13 +1483,13 @@ void PM_walk(float buttons_prev, float maxspd_mod)
        {
 #ifdef SVQC
                if (autocvar_speedmeter)
-                       dprint(strcat("landing velocity: ", vtos(self.velocity), " (abs: ", ftos(vlen(self.velocity)), ")\n"));
+                       LOG_TRACE(strcat("landing velocity: ", vtos(self.velocity), " (abs: ", ftos(vlen(self.velocity)), ")\n"));
 #endif
                if (self.lastground < time - 0.3)
                        self.velocity *= (1 - PHYS_FRICTION_ONLAND);
 #ifdef SVQC
                if (self.jumppadcount > 1)
-                       dprint(strcat(ftos(self.jumppadcount), "x jumppad combo\n"));
+                       LOG_TRACE(strcat(ftos(self.jumppadcount), "x jumppad combo\n"));
                self.jumppadcount = 0;
 #endif
        }
index ea783a12d6424bb35751ddc157adcda2d6205700..74004d062bcd0cb14b88b1b91568f8e76b4cad87 100644 (file)
@@ -394,9 +394,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
-                       dprint("Got response from player stats server:\n");
-                       while((s = url_fgets(fh))) { dprint("  ", s, "\n"); }
-                       dprint("End of response.\n");
+                       LOG_TRACE("Got response from player stats server:\n");
+                       while((s = url_fgets(fh))) { LOG_TRACE("  ", s, "\n"); }
+                       LOG_TRACE("End of response.\n");
                        url_fclose(fh);
                        break;
                }
@@ -404,7 +404,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status)
                case URL_READY_CLOSED:
                {
                        // url_fclose has finished
-                       dprint("Player stats written\n");
+                       LOG_TRACE("Player stats written\n");
                        PlayerStats_GameReport_DelayMapVote = false;
                        if(PS_GR_OUT_DB >= 0)
                        {
@@ -417,7 +417,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status)
                case URL_READY_ERROR:
                default:
                {
-                       print("Player stats writing failed: ", ftos(status), "\n");
+                       LOG_INFO("Player stats writing failed: ", ftos(status), "\n");
                        PlayerStats_GameReport_DelayMapVote = false;
                        if(PS_GR_OUT_DB >= 0)
                        {
@@ -443,7 +443,7 @@ void PlayerStats_PlayerBasic(entity joiningplayer, float newrequest)
 
                        // now request the information
                        uri = strcat(uri, "/player/", uri_escape(uri_escape(joiningplayer.crypto_idfp)), "/elo.txt");
-                       dprint("Retrieving playerstats from URL: ", uri, "\n");
+                       LOG_TRACE("Retrieving playerstats from URL: ", uri, "\n");
                        url_single_fopen(
                                uri,
                                FILE_APPEND,
@@ -484,7 +484,7 @@ void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer)
        // determine whether we should retrieve playerbasic information again
 
        #if 0
-       printf("PlayerStats_PlayerBasic_CheckUpdate('%s'): %f\n",
+       LOG_INFOF("PlayerStats_PlayerBasic_CheckUpdate('%s'): %f\n",
                joiningplayer.netname,
                time
        );
@@ -508,7 +508,7 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status)
        {
                case URL_READY_CANWRITE:
                {
-                       dprint("-- Sending data to player stats server\n");
+                       LOG_TRACE("-- Sending data to player stats server\n");
                        /*url_fputs(fh, "V 1\n");
                        #ifdef WATERMARK
                        url_fputs(fh, sprintf("R %s\n", WATERMARK));
@@ -526,11 +526,11 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status)
                case URL_READY_CANREAD:
                {
                        string s = "";
-                       dprint("-- Got response from player stats server:\n");
+                       LOG_TRACE("-- Got response from player stats server:\n");
                        //string gametype = string_null;
                        while((s = url_fgets(fh)))
                        {
-                               dprint("  ", s, "\n");
+                               LOG_TRACE("  ", s, "\n");
                                /*
                                string key = "", value = "", data = "";
 
@@ -581,21 +581,21 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status)
                                continue;
                                */
                        }
-                       dprint("-- End of response.\n");
+                       LOG_TRACE("-- End of response.\n");
                        url_fclose(fh);
                        break;
                }
                case URL_READY_CLOSED:
                {
                        // url_fclose has finished
-                       print("Player stats synchronized with server\n");
+                       LOG_INFO("Player stats synchronized with server\n");
                        break;
                }
 
                case URL_READY_ERROR:
                default:
                {
-                       print("Receiving player stats failed: ", ftos(status), "\n");
+                       LOG_INFO("Receiving player stats failed: ", ftos(status), "\n");
                        break;
                }
        }
@@ -610,7 +610,7 @@ void PlayerStats_PlayerBasic_Handler(entity fh, entity p, float status)
        float i = 0;
        for(e = PS_D_IN_EVL; (en = db_get(PS_D_IN_DB, e)) != ""; e = en)
        {
-               print(sprintf("%d:%s:%s\n", i, e, db_get(PS_D_IN_DB, sprintf("#%s", e))));
+               LOG_INFO(sprintf("%d:%s:%s\n", i, e, db_get(PS_D_IN_DB, sprintf("#%s", e))));
                ++i;
        }
 #endif
@@ -634,7 +634,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);
-       dprint("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\n");
 }
 
 void PlayerStats_PlayerDetail(void)
@@ -647,7 +647,7 @@ void PlayerStats_PlayerDetail(void)
                        PS_D_IN_DB = db_create();
 
                //uri = strcat(uri, "/player/", uri_escape(crypto_getmyidfp(0)));
-               dprint("Retrieving playerstats from URL: ", autocvar_g_playerstats_playerdetail_uri, "\n");
+               LOG_TRACE("Retrieving playerstats from URL: ", autocvar_g_playerstats_playerdetail_uri, "\n");
                url_single_fopen(
                        autocvar_g_playerstats_playerdetail_uri,
                        FILE_APPEND,
@@ -676,7 +676,7 @@ void PlayerStats_PlayerDetail_CheckUpdate(void)
        float gamecount = cvar("cl_matchcount");
 
        #if 0
-       printf("PlayerStats_PlayerDetail_CheckUpdate(): %f >= %f, %d > %d\n",
+       LOG_INFOF("PlayerStats_PlayerDetail_CheckUpdate(): %f >= %f, %d > %d\n",
                time,
                PS_D_NEXTUPDATETIME,
                PS_D_LASTGAMECOUNT,
@@ -702,7 +702,7 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity unused, float status)
        {
                case URL_READY_CANWRITE:
                {
-                       dprint("PlayerStats_PlayerDetail_Handler(): Sending data to player stats server...\n");
+                       LOG_TRACE("PlayerStats_PlayerDetail_Handler(): Sending data to player stats server...\n");
                        url_fputs(fh, "V 1\n");
                        #ifdef WATERMARK
                        url_fputs(fh, sprintf("R %s\n", WATERMARK));
@@ -775,7 +775,7 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity unused, float status)
 
                                        default:
                                        {
-                                               printf(
+                                               LOG_INFOF(
                                                        "PlayerStats_PlayerDetail_Handler(): ERROR: "
                                                        "Key went unhandled? Is our version outdated?\n"
                                                        "PlayerStats_PlayerDetail_Handler(): "
@@ -789,7 +789,7 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity unused, float status)
                                }
 
                                #if 0
-                               print(sprintf(
+                               LOG_INFO(sprintf(
                                        "PlayerStats_PlayerDetail_Handler(): "
                                        "Key '%s', Event '%s', Data '%s'\n",
                                        key,
@@ -808,14 +808,14 @@ void PlayerStats_PlayerDetail_Handler(entity fh, entity unused, float status)
                case URL_READY_CLOSED:
                {
                        // url_fclose has finished
-                       print("PlayerStats_PlayerDetail_Handler(): Player stats synchronized with server.\n");
+                       LOG_INFO("PlayerStats_PlayerDetail_Handler(): Player stats synchronized with server.\n");
                        break;
                }
 
                case URL_READY_ERROR:
                default:
                {
-                       print("PlayerStats_PlayerDetail_Handler(): Receiving player stats failed: ", ftos(status), "\n");
+                       LOG_INFO("PlayerStats_PlayerDetail_Handler(): Receiving player stats failed: ", ftos(status), "\n");
                        PlayerStats_PlayerDetail_Status = PS_D_STATUS_ERROR;
                        if(PS_D_IN_DB >= 0)
                        {
index 04f8f24166bb96ec1a6f699bd4c0a598e615b88f..4c56815d2ffc3488a089a23c27ab56b26d6176a8 100644 (file)
@@ -553,10 +553,10 @@ void LinkDoors()
        FindConnectedComponent(self, enemy, LinkDoors_nextent, LinkDoors_isconnected, world);
 
        // set owner, and make a loop of the chain
-       dprint("LinkDoors: linking doors:");
+       LOG_TRACE("LinkDoors: linking doors:");
        for(t = self; ; t = t.enemy)
        {
-               dprint(" ", etos(t));
+               LOG_TRACE(" ", etos(t));
                t.owner = self;
                if(t.enemy == world)
                {
@@ -564,7 +564,7 @@ void LinkDoors()
                        break;
                }
        }
-       dprint("\n");
+       LOG_TRACE("\n");
 
        // collect health, targetname, message, size
        cmins = self.absmin;
index 4594c90d971823dafc7c6efc8bc2c3249b5dd260..b3a5a24330763d13152eb088cecb0dfd9ff445df 100644 (file)
@@ -225,7 +225,7 @@ void Net_TargetMusic()
                sound(e, CH_BGM_SINGLE, e.noise, 0, ATTEN_NONE);
                if(getsoundtime(e, CH_BGM_SINGLE) < 0)
                {
-                       dprintf("Cannot initialize sound %s\n", e.noise);
+                       LOG_TRACEF("Cannot initialize sound %s\n", e.noise);
                        strunzone(e.noise);
                        e.noise = string_null;
                }
@@ -312,7 +312,7 @@ void Ent_ReadTriggerMusic()
                        sound(self, CH_BGM_SINGLE, self.noise, 0, ATTEN_NONE);
                        if(getsoundtime(self, CH_BGM_SINGLE) < 0)
                        {
-                               dprintf("Cannot initialize sound %s\n", self.noise);
+                               LOG_TRACEF("Cannot initialize sound %s\n", self.noise);
                                strunzone(self.noise);
                                self.noise = string_null;
                        }
index f5c54b58eb942f276e6c4503463f193f352d0d15..da7aeda71e9c628055b7223b9299eb9ba87d0625 100644 (file)
@@ -57,7 +57,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                        data = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", key)));
                        if(data.y == 0) // undefined field, i.e., invalid type
                        {
-                               print("target_spawn: invalid/unknown entity key ", key, " specified, ignored!\n");
+                               LOG_INFO("target_spawn: invalid/unknown entity key ", key, " specified, ignored!\n");
                                continue;
                        }
                }
@@ -152,7 +152,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                }
                                else
                                {
-                                       print("target_spawn: invalid/unknown variable replacement ", value, " specified, ignored!\n");
+                                       LOG_INFO("target_spawn: invalid/unknown variable replacement ", value, " specified, ignored!\n");
                                        continue;
                                }
 
@@ -165,13 +165,13 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                {
                                        if(value != "")
                                        {
-                                               print("target_spawn: try to get a field of a non-entity, ignored!\n");
+                                               LOG_INFO("target_spawn: try to get a field of a non-entity, ignored!\n");
                                                continue;
                                        }
                                        data2 = stov(db_get(TemporaryDB, strcat("/target_spawn/field/", valuefield)));
                                        if(data2_y == 0) // undefined field, i.e., invalid type
                                        {
-                                               print("target_spawn: invalid/unknown entity key replacement ", valuefield, " specified, ignored!\n");
+                                               LOG_INFO("target_spawn: invalid/unknown entity key replacement ", valuefield, " specified, ignored!\n");
                                                continue;
                                        }
                                        value = getentityfieldstring(data2_x, valueent);
@@ -191,7 +191,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                                        value = vtos(stov(value) + stov(valueoffset));
                                                        break;
                                                default:
-                                                       print("target_spawn: only string, float and vector fields can do calculations, calculation ignored!\n");
+                                                       LOG_INFO("target_spawn: only string, float and vector fields can do calculations, calculation ignored!\n");
                                                        break;
                                        }
                                }
@@ -208,7 +208,7 @@ void target_spawn_edit_entity(entity e, string msg, entity kt, entity t2, entity
                                                        value = vtos(stov(value) + random() * data2_x * '1 0 0' + random() * data2_y * '0 1 0' + random() * data2_z * '0 0 1');
                                                        break;
                                                default:
-                                                       print("target_spawn: only float and vector fields can do random calculations, calculation ignored!\n");
+                                                       LOG_INFO("target_spawn: only float and vector fields can do random calculations, calculation ignored!\n");
                                                        break;
                                        }
                                }
index 89a5fa20df1cef803ab61357d98e06e06d3ffd24..f7240f65a21057a57460ad40a75826a35b39f65f 100644 (file)
@@ -190,7 +190,7 @@ void teleport_findtarget (void)
                if(e.movetype == MOVETYPE_NONE)
                        waypoint_spawnforteleporter(self, e.origin, 0);
                if(e.classname != "info_teleport_destination")
-                       print("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
+                       LOG_INFO("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
        }
 
        if(n == 0)
@@ -239,7 +239,7 @@ void WarpZone_PostTeleportPlayer_Callback(entity pl)
        if(pl.owner == pl.realowner)
        {
                if(!(pl.flags & FL_PROJECTILE))
-                       print("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".\n");
+                       LOG_INFO("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".\n");
                pl.owner = world;
        }
        if(IS_PLAYER(pl))
index cd5fdff322955dcbe5c86fd8e2548cfe5c48bd84..2a0432c97827790b3a6a0a483f4e86a830a26851 100644 (file)
@@ -21,7 +21,7 @@ void trigger_disablerelay_use()
        }
 
        if((!a) == (!b))
-               print("Invalid use of trigger_disablerelay: ", ftos(a), " relays were on, ", ftos(b), " relays were off!\n");
+               LOG_INFO("Invalid use of trigger_disablerelay: ", ftos(a), " relays were on, ", ftos(b), " relays were off!\n");
 }
 
 void spawnfunc_trigger_disablerelay()
index b36b5eadb2f8f39c27f0f3aa33e9d1f93816d33b..62c37a0f49630664ccbe8a7209b58f2082abd4ff 100644 (file)
@@ -69,7 +69,7 @@ void viewloc_init()
                        break;
                }
 
-       if(!self.enemy) { print("^1FAIL!\n"); remove(self); return; }
+       if(!self.enemy) { LOG_INFO("^1FAIL!\n"); remove(self); return; }
 
        if(!self.goalentity)
                self.goalentity = self.enemy; // make them match so CSQC knows what to do
@@ -83,7 +83,7 @@ void viewloc_init()
 void spawnfunc_trigger_viewlocation()
 {
        // we won't check target2 here yet, as it may not even need to exist
-       if(self.target == "") { print("^1FAIL!\n"); remove(self); return; }
+       if(self.target == "") { LOG_INFO("^1FAIL!\n"); remove(self); return; }
 
        EXACTTRIGGER_INIT;
        InitializeEntity(self, viewloc_init, INITPRIO_FINDTARGET);
index f2fc3a8cb134a285a54dfc65cc9806b9748a7f1c..924ba7ecf008fc1c8f53b384e9e9893a304c60bf 100644 (file)
@@ -60,7 +60,7 @@ void turret_checkpoint_init()
     {
         self.enemy = find(world, targetname, self.target);
         if(self.enemy == world)
-            dprint("A turret_checkpoint faild to find its target!\n");
+            LOG_TRACE("A turret_checkpoint faild to find its target!\n");
     }
     //self.think = turret_checkpoint_think;
     //self.nextthink = time + tc_acum + 0.25;
index 1e75506ab1e46636152fb064a771c156d013575e..788f64658148d27f031fb00de12fd175801be3db 100644 (file)
@@ -110,7 +110,7 @@ void turret_draw2d()
        if(rgb == '0 0 0')
        {
                self.teamradar_color = '1 0 1';
-               printf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
+               LOG_INFOF("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
        }
 
        txt = self.netname;
index 547b5c6f2a4f5570bb5c8b823585f57a65a61747..f35448e9c2212dd98506391dbced0b0133658e6d 100644 (file)
@@ -48,7 +48,7 @@ void Dump_Turret_Settings(void)
                TUR_CONFIG_WRITETOFILE("// }}}\n")
 
                // step 5: debug info
-               print(sprintf("#%d: %s: %d settings...\n", i, TUR_NAME(i), TUR_CONFIG_COUNT));
+               LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, TUR_NAME(i), TUR_CONFIG_COUNT));
                totalsettings += TUR_CONFIG_COUNT;
        }
 
@@ -58,5 +58,5 @@ void Dump_Turret_Settings(void)
                { tur_config_queue[x] = string_null; }
 
        // extra information
-       print(sprintf("Totals: %d turrets, %d settings\n", (i - 1), totalsettings));
+       LOG_INFO(sprintf("Totals: %d turrets, %d settings\n", (i - 1), totalsettings));
 }
index 85cbd2006c75e7abedfe63c81fe555788225b1a0..9eb69f29dd54fa804b86e94e2456e453e4dce94c 100644 (file)
@@ -17,7 +17,7 @@ string tur_config_queue[MAX_TUR_CONFIG];
 
 #define TUR_CONFIG_WRITETOFILE(a) { \
        fputs(tur_config_file, a); \
-       if(tur_config_alsoprint) { print(a); } }
+       if(tur_config_alsoprint) { LOG_INFO(a); } }
 
 #define TUR_CONFIG_WRITE_CVARS(turret,name) \
                { TUR_CONFIG_QUEUE( \
index fa5318dc2d602917a982aa14bdbfbd348da84aca..b0f1f0170d4dc3389ed3e7cb7c3f230998fb9bc2 100644 (file)
@@ -827,7 +827,7 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl
        */
 
 #ifdef TURRET_DEBUG_TARGETSELECT
-       dprint("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,"\n");
 #endif
 
        return 1;
@@ -1177,7 +1177,7 @@ void turret_think()
 */
 void turret_use()
 {
-       dprint("Turret ",self.netname, " used by ", activator.classname, "\n");
+       LOG_TRACE("Turret ",self.netname, " used by ", activator.classname, "\n");
 
        self.team = activator.team;
 
@@ -1361,7 +1361,7 @@ float turret_initialize(float tur_id)
                if (self.tur_defend == world)
                {
                        self.target = "";
-                       dprint("Turret has invalid defendpoint!\n");
+                       LOG_TRACE("Turret has invalid defendpoint!\n");
                }
        }
 
index f0c02cb3f7b034a08951b81db522c30e93bf0247..32bad5fb175b34a6163baf1e2fe7baeaedffe2b8 100644 (file)
@@ -212,12 +212,12 @@ float t_ewheel(float req)
                     e = find(world, targetname, self.target);
                     if (!e)
                     {
-                        dprint("Initital waypoint for ewheel does NOT exsist, fix your map!\n");
+                        LOG_TRACE("Initital waypoint for ewheel does NOT exsist, fix your map!\n");
                         self.target = "";
                     }
 
                     if (e.classname != "turret_checkpoint")
-                        dprint("Warning: not a turrret path\n");
+                        LOG_TRACE("Warning: not a turrret path\n");
                     else
                     {
 
index a71ba4c3bf3e734739e0c5443bca8067fad440f5..fca6a5b718ead3e93f203cf1acacf667b3a02f33 100644 (file)
@@ -35,8 +35,8 @@ float t_mlrs(float req)
             self.tur_head.frame = bound(0, 6 - floor(0.1 + self.ammo / self.shot_dmg), 6);
             if(self.tur_head.frame < 0)
             {
-                dprint("ammo:",ftos(self.ammo),"\n");
-                dprint("shot_dmg:",ftos(self.shot_dmg),"\n");
+                LOG_TRACE("ammo:",ftos(self.ammo),"\n");
+                LOG_TRACE("shot_dmg:",ftos(self.shot_dmg),"\n");
             }
 
             return true;
index 169f10b2411b397196a068607bcccaee649e3c6b..1375d02ae21f3278c24abd2d2f4d58eee1f76c18 100644 (file)
@@ -613,12 +613,12 @@ float t_walker(float req)
                 e = find(world, targetname, self.target);
                 if (!e)
                 {
-                    dprint("Initital waypoint for walker does NOT exsist, fix your map!\n");
+                    LOG_TRACE("Initital waypoint for walker does NOT exsist, fix your map!\n");
                     self.target = "";
                 }
 
                 if (e.classname != "turret_checkpoint")
-                    dprint("Warning: not a turrret path\n");
+                    LOG_TRACE("Warning: not a turrret path\n");
                 else
                 {
 #ifdef WALKER_FANCYPATHING
index eb744a98949ae5ccdc4d2325b8359a1998521fdf..8cce4ac1c88047d5e871e4debb6622ce4e2c0251 100644 (file)
@@ -288,7 +288,7 @@ void db_save(float db, string pFilename)
        fh = fopen(pFilename, FILE_WRITE);
        if(fh < 0)
        {
-               print(strcat("^1Can't write DB to ", pFilename));
+               LOG_INFO(strcat("^1Can't write DB to ", pFilename));
                return;
        }
        n = buf_getsize(db);
@@ -382,16 +382,16 @@ void db_put(float db, string pKey, string pValue)
 void db_test()
 {
        float db, i;
-       print("LOAD...\n");
+       LOG_INFO("LOAD...\n");
        db = db_load("foo.db");
-       print("LOADED. FILL...\n");
+       LOG_INFO("LOADED. FILL...\n");
        for(i = 0; i < DB_BUCKETS; ++i)
                db_put(db, ftos(random()), "X");
-       print("FILLED. SAVE...\n");
+       LOG_INFO("FILLED. SAVE...\n");
        db_save(db, "foo.db");
-       print("SAVED. CLOSE...\n");
+       LOG_INFO("SAVED. CLOSE...\n");
        db_close(db);
-       print("CLOSED.\n");
+       LOG_INFO("CLOSED.\n");
 }
 
 // Multiline text file buffers
@@ -620,17 +620,17 @@ void compressShortVector_init()
 
        if(cvar("developer"))
        {
-               print("Verifying vector compression table...\n");
+               LOG_INFO("Verifying vector compression table...\n");
                for(i = 0x0F00; i < 0xFFFF; ++i)
                        if(i != compressShortVector(decompressShortVector(i)))
                        {
-                               print("BROKEN vector compression: ", ftos(i));
-                               print(" -> ", vtos(decompressShortVector(i)));
-                               print(" -> ", ftos(compressShortVector(decompressShortVector(i))));
-                               print("\n");
+                               LOG_INFO("BROKEN vector compression: ", ftos(i));
+                               LOG_INFO(" -> ", vtos(decompressShortVector(i)));
+                               LOG_INFO(" -> ", ftos(compressShortVector(decompressShortVector(i))));
+                               LOG_INFO("\n");
                                error("b0rk");
                        }
-               print("Done.\n");
+               LOG_INFO("Done.\n");
        }
 }
 
@@ -892,13 +892,13 @@ float cvar_settemp(string tmp_cvar, string tmp_value)
 
        if (!(tmp_cvar || tmp_value))
        {
-               dprint("Error: Invalid usage of cvar_settemp(string, string); !\n");
+               LOG_TRACE("Error: Invalid usage of cvar_settemp(string, string); !\n");
                return 0;
        }
 
        if(!cvar_type(tmp_cvar))
        {
-               printf("Error: cvar %s doesn't exist!\n", tmp_cvar);
+               LOG_INFOF("Error: cvar %s doesn't exist!\n", tmp_cvar);
                return 0;
        }
 
@@ -935,7 +935,7 @@ float cvar_settemp_restore()
                        ++i;
                }
                else
-                       printf("Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.\n", e.netname);
+                       LOG_INFOF("Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.\n", e.netname);
        }
 
        return i;
@@ -1735,17 +1735,17 @@ float compressShotOrigin(vector v)
        z = rint(v.z * 4) + 128;
        if(x > 255 || x < 0)
        {
-               print("shot origin ", vtos(v), " x out of bounds\n");
+               LOG_INFO("shot origin ", vtos(v), " x out of bounds\n");
                x = bound(0, x, 255);
        }
        if(y > 255 || y < 0)
        {
-               print("shot origin ", vtos(v), " y out of bounds\n");
+               LOG_INFO("shot origin ", vtos(v), " y out of bounds\n");
                y = bound(0, y, 255);
        }
        if(z > 255 || z < 0)
        {
-               print("shot origin ", vtos(v), " z out of bounds\n");
+               LOG_INFO("shot origin ", vtos(v), " z out of bounds\n");
                z = bound(0, z, 255);
        }
        return x * 0x10000 + y * 0x100 + z;
@@ -2350,7 +2350,7 @@ void m_shutdown()
 {
        if(shutdown_running)
        {
-               print("Recursive shutdown detected! Only restoring cvars...\n");
+               LOG_INFO("Recursive shutdown detected! Only restoring cvars...\n");
        }
        else
        {
@@ -2628,7 +2628,7 @@ vector animfixfps(entity e, vector a, vector b)
 #ifdef SVQC
 void dedicated_print(string input) // print(), but only print if the server is not local
 {
-       if(server_is_dedicated) { print(input); }
+       if(server_is_dedicated) { LOG_INFO(input); }
 }
 #endif
 
index d55f797443a96baa60cff7591a60b09566d0f6f0..7b0f6553630a3ca75074367b075bc08fefb7a072 100644 (file)
@@ -572,7 +572,7 @@ void vehicles_setreturn(entity veh)
 
 void vehicle_use()
 {
-       dprint("vehicle ",self.netname, " used by ", activator.classname, "\n");
+       LOG_TRACE("vehicle ",self.netname, " used by ", activator.classname, "\n");
 
        self.tur_head.team = activator.team;
 
@@ -583,7 +583,7 @@ void vehicle_use()
 
        if(self.active == ACTIVE_ACTIVE && self.deadflag == DEAD_NO && !gameover)
        {
-               dprint("Respawning vehicle: ", self.netname, "\n");
+               LOG_TRACE("Respawning vehicle: ", self.netname, "\n");
                if(self.effects & EF_NODRAW)
                {
                        self.think = vehicles_spawn;
@@ -832,7 +832,7 @@ void vehicles_exit(bool eject)
 
        if(vehicles_exit_running)
        {
-               dprint("^1vehicles_exit allready running! this is not good..\n");
+               LOG_TRACE("^1vehicles_exit allready running! this is not good..\n");
                return;
        }
 
@@ -1138,7 +1138,7 @@ void vehicles_think()
 // initialization
 void vehicles_spawn()
 {
-       dprint("Spawning vehicle: ", self.classname, "\n");
+       LOG_TRACE("Spawning vehicle: ", self.classname, "\n");
 
        // disown & reset
        self.vehicle_hudmodel.viewmodelforclient = self;
index 65eb131685ffe2486bab7d871e0723d872454de7..b33d3325622b14e2e27a15bc575d8eb0a2237432 100644 (file)
@@ -324,7 +324,7 @@ bool bumblebee_gunner_enter()
        }
        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 { dprint("Vehicle is full, fail\n"); return false; }
+       else { LOG_TRACE("Vehicle is full, fail\n"); return false; }
 
        player.vehicle                  = gunner;
        player.angles                   = vehic.angles;
index 24e6d08ebeb751925a824be5bb7940524ace2f2e..125e6f8e12f0cfa0d27ed2af62eabe33219ab890 100644 (file)
@@ -132,9 +132,9 @@ void viewloc_SetViewLocation()
                }
 
 #if 0
-               dprint(vtos(camera_position), "\n");
-               dprint(vtos(old_camera_angle), "\n");
-               dprint(vtos(camera_angle), "\n");
+               LOG_TRACE(vtos(camera_position), "\n");
+               LOG_TRACE(vtos(old_camera_angle), "\n");
+               LOG_TRACE(vtos(camera_angle), "\n");
 #endif
 
                freeze_org = getpropertyvec(VF_ORIGIN);
index 46bb8a6d45d465879915690e1ef4d51383800903..16b507d14eee683e65c13e28a42399efdd48054f 100644 (file)
@@ -55,7 +55,7 @@ vector damage_explosion_calcpush(vector explosion_f, vector target_v, float spee
        v = explosion_calcpush(explosion_f * speedfactor, m, target_v, 1, 0);
        // the factor we then get is:
        //   1
-       printf("MASS: %f\nv: %v -> %v\nENERGY BEFORE == %f + %f = %f\nENERGY AFTER >= %f\n",
+       LOG_INFOF("MASS: %f\nv: %v -> %v\nENERGY BEFORE == %f + %f = %f\nENERGY AFTER >= %f\n",
                m,
                target_v, target_v + v,
                target_v * target_v, m * explosion_f * speedfactor * explosion_f * speedfactor, target_v * target_v + m * explosion_f * speedfactor * explosion_f * speedfactor,
index 0448f4874a26c416f08d709a376705a20be8183f..b90c01f4a65abd6e300485335c03fa2bd74e32ed 100644 (file)
@@ -51,7 +51,7 @@ void Dump_Weapon_Settings(void)
                WEP_CONFIG_WRITETOFILE("// }}}\n");
 
                // step 5: debug info
-               print(sprintf("#%d: %s: %d settings...\n", i, WEP_NAME(i), WEP_CONFIG_COUNT));
+               LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, WEP_NAME(i), WEP_CONFIG_COUNT));
                totalsettings += WEP_CONFIG_COUNT;
        }
 
@@ -61,5 +61,5 @@ void Dump_Weapon_Settings(void)
                { wep_config_queue[x] = string_null; }
 
        // extra information
-       print(sprintf("Totals: %d weapons, %d settings\n", (i - 1), totalsettings));
+       LOG_INFO(sprintf("Totals: %d weapons, %d settings\n", (i - 1), totalsettings));
 }
index 4e968ec4e518629d0a1dd9c9f8319b901e75fef0..410dbdfadeb8b1f7fe79e4eeacf63bdf1a7e14d0 100644 (file)
@@ -19,7 +19,7 @@ string wep_config_queue[MAX_WEP_CONFIG];
 
 #define WEP_CONFIG_WRITETOFILE(a) do { \
        fputs(wep_config_file, a); \
-       if(wep_config_alsoprint) { print(a); } \
+       if(wep_config_alsoprint) { LOG_INFO(a); } \
 } while(0)
 
 #define WEP_CONFIG_WRITE_CVARS_NONE(wepname,name) \
index e79e38461c4117d365fc666ed8ab0f05b9065d40..fc4e2c3e0ca9ec9ae13de9353c83d2ee6cc9566e 100644 (file)
@@ -605,14 +605,14 @@ bool W_Devastator(int req)
                        #if 0
                        if(self.rl_release == 0)
                        {
-                               printf("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: TRUE\n", self.rl_release, self.WEP_AMMO(DEVASTATOR), WEP_CVAR(devastator, ammo));
+                               LOG_INFOF("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: TRUE\n", self.rl_release, self.WEP_AMMO(DEVASTATOR), WEP_CVAR(devastator, ammo));
                                return true;
                        }
                        else
                        {
                                ammo_amount = self.WEP_AMMO(DEVASTATOR) >= WEP_CVAR(devastator, ammo);
                                ammo_amount += self.(weapon_load[WEP_DEVASTATOR.m_id]) >= WEP_CVAR(devastator, ammo);
-                               printf("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: %s\n", self.rl_release, self.WEP_AMMO(DEVASTATOR), WEP_CVAR(devastator, ammo), (ammo_amount ? "TRUE" : "FALSE"));
+                               LOG_INFOF("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: %s\n", self.rl_release, self.WEP_AMMO(DEVASTATOR), WEP_CVAR(devastator, ammo), (ammo_amount ? "TRUE" : "FALSE"));
                                return ammo_amount;
                        }
                        #else
index 6d31708b43535fd7a08b2db741a72ecbb798543b..fb6cc4d5f5d9d6b1d747fdf5b993301c8042e2ce 100644 (file)
@@ -411,7 +411,7 @@ bool W_Porto(int req)
        {
                case WR_IMPACTEFFECT:
                {
-                       print("Since when does Porto send DamageInfo?\n");
+                       LOG_INFO("Since when does Porto send DamageInfo?\n");
                        return true;
                }
                case WR_INIT:
index a879bf342330defec4aca88d858bf61446e6e577..640dae3977e97899ffe4fd7dc73a6707925a4004 100644 (file)
@@ -96,7 +96,7 @@ void W_Rifle_BulletHail_Continue(void)
        af = ATTACK_FINISHED(self);
        self.switchweapon = self.weapon;
        ATTACK_FINISHED(self) = time;
-       print(ftos(self.WEP_AMMO(RIFLE)), "\n");
+       LOG_INFO(ftos(self.WEP_AMMO(RIFLE)), "\n");
        r = weapon_prepareattack(self.rifle_bullethail_frame == WFRAME_FIRE2, self.rifle_bullethail_refire);
        if(self.switchweapon == self.weapon)
                self.switchweapon = sw;
@@ -104,12 +104,12 @@ void W_Rifle_BulletHail_Continue(void)
        {
                self.rifle_bullethail_attackfunc();
                weapon_thinkf(self.rifle_bullethail_frame, self.rifle_bullethail_animtime, W_Rifle_BulletHail_Continue);
-               print("thinkf set\n");
+               LOG_INFO("thinkf set\n");
        }
        else
        {
                ATTACK_FINISHED(self) = af; // reset attack_finished if we didn't fire, so the last shot enforces the refire time
-               print("out of ammo... ", ftos(self.weaponentity.state), "\n");
+               LOG_INFO("out of ammo... ", ftos(self.weaponentity.state), "\n");
        }
 }
 
index 40faf04025ea6fd51d60e2c4b5cac01ad3f9c518..f0e832f2bca3bb3af44b42a35552b6d6827212af 100644 (file)
@@ -189,7 +189,7 @@ void W_Shockwave_Melee_Think(void)
                                { accuracy_add(self.realowner, WEP_SHOCKWAVE.m_id, 0, swing_damage); }
 
                        #ifdef DEBUG_SHOCKWAVE
-                       print(sprintf(
+                       LOG_INFO(sprintf(
                                "MELEE: %s hitting %s with %f damage (factor: %f) at %f time.\n",
                                self.realowner.netname,
                                target_victim.netname,
@@ -462,7 +462,7 @@ void W_Shockwave_Attack(void)
                                );
 
                                #ifdef DEBUG_SHOCKWAVE
-                               print(sprintf(
+                               LOG_INFO(sprintf(
                                        "SELF HIT: multiplier = %f, damage = %f, force = %f... "
                                        "multiplier_from_accuracy = %f, multiplier_from_distance = %f.\n",
                                        multiplier,
@@ -525,7 +525,7 @@ void W_Shockwave_Attack(void)
                                if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { queue = min(queue + 1, MAX_SHOCKWAVE_HITS); }
 
                                #ifdef DEBUG_SHOCKWAVE
-                               print(sprintf(
+                               LOG_INFO(sprintf(
                                        "SPLASH HIT: multiplier = %f, damage = %f, force = %f... "
                                        "multiplier_from_accuracy = %f, multiplier_from_distance = %f.\n",
                                        multiplier,
@@ -614,7 +614,7 @@ void W_Shockwave_Attack(void)
                                if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { queue = min(queue + 1, MAX_SHOCKWAVE_HITS); }
 
                                #ifdef DEBUG_SHOCKWAVE
-                               print(sprintf(
+                               LOG_INFO(sprintf(
                                        "BLAST HIT: multiplier = %f, damage = %f, force = %f... "
                                        "multiplier_from_accuracy = %f, multiplier_from_distance = %f.\n",
                                        multiplier,
@@ -647,12 +647,12 @@ void W_Shockwave_Attack(void)
 
                if(accuracy_isgooddamage(self.realowner, head))
                {
-                       print("wtf\n");
+                       LOG_INFO("wtf\n");
                        accuracy_add(self.realowner, WEP_SHOCKWAVE.m_id, 0, final_damage);
                }
 
                #ifdef DEBUG_SHOCKWAVE
-               print(sprintf(
+               LOG_INFO(sprintf(
                        "SHOCKWAVE by %s: damage = %f, force = %f.\n",
                        self.netname,
                        final_damage,
index 7cb3c2852244f53aa105f4d771864a4432990867..3d5f9a00cbc0679eb0cdc0234a87a3c43189e6db 100644 (file)
@@ -177,7 +177,7 @@ void CSQCPlayer_PredictTo(float endframe, float apply_error)
        {
                csqcplayer_moveframe = clientcommandframe;
                getinputstate(csqcplayer_moveframe-1);
-               print("the Weird code path got hit\n");
+               LOG_INFO("the Weird code path got hit\n");
                return;
        }
 #endif
index 975080a71a2de0f85c4857f1d6787f43c14e1121..4f588226912d92dbeba82543617734b952aa056a 100644 (file)
@@ -11,7 +11,7 @@ float prandom()
        prandom_seed = c;
 
 #ifdef USE_PRANDOM_DEBUG
-       dprint("RANDOM -> ", ftos(c), "\n");
+       LOG_TRACE("RANDOM -> ", ftos(c), "\n");
 #endif
 
        return c / 65536; // in [0..1[
@@ -36,14 +36,14 @@ void psrandom(float seed)
 {
        prandom_seed = seed;
 #ifdef USE_PRANDOM_DEBUG
-       dprint("SRANDOM ", ftos(seed), "\n");
+       LOG_TRACE("SRANDOM ", ftos(seed), "\n");
 #endif
 }
 
 #ifdef USE_PRANDOM_DEBUG
 void prandom_debug()
 {
-       dprint("Current random seed = ", ftos(prandom_seed), "\n");
+       LOG_TRACE("Current random seed = ", ftos(prandom_seed), "\n");
 }
 #endif
 #endif
index 04f9f68fe967356327968ae4d1d99168cee88c5d..23907fe5f15ed4106c69fae466807abd79fe2911 100644 (file)
@@ -5,7 +5,7 @@ float TEST_ok;
 
 void TEST_Fail(string cond)
 {
-       printf("Assertion failed: ", cond);
+       LOG_INFOF("Assertion failed: ", cond);
        //backtrace();
        ++TEST_failed;
 }
@@ -28,29 +28,29 @@ float TEST_RunAll()
        }
        if(f)
        {
-               printf("%d tests failed\n", f);
+               LOG_INFOF("%d tests failed\n", f);
                return 1;
        }
        else
        {
-               printf("All tests OK\n", f);
+               LOG_INFOF("All tests OK\n", f);
                return 0;
        }
 }
 
 float TEST_Run(string s)
 {
-       printf("%s: testing...\n", s);
+       LOG_INFOF("%s: testing...\n", s);
        TEST_failed = TEST_ok = 0;
        callfunction(strcat("_TEST_", s));
        if(TEST_failed > 0)
        {
-               printf("%s: %d items failed.\n", s, TEST_failed);
+               LOG_INFOF("%s: %d items failed.\n", s, TEST_failed);
                return 0;
        }
        else if(!TEST_ok)
        {
-               printf("%s: did not complete.\n", s);
+               LOG_INFOF("%s: did not complete.\n", s);
                return 0;
        }
        return 1;
index ce8de504b028f8c1ff654b632e196f1b86633512..9648b2080f5abb0cae734a96d3a220dcd93ae5c2 100644 (file)
@@ -35,7 +35,7 @@ float url_URI_Get_Callback(int id, float status, string data)
                return 0;
        if(e.url_rbuf >= 0 || e.url_wbuf >= 0)
        {
-               printf("WARNING: handle %d (%s) has already received data?!?\n", id + NUM_URL_ID, e.url_url);
+               LOG_INFOF("WARNING: handle %d (%s) has already received data?!?\n", id + NUM_URL_ID, e.url_url);
                return 0;
        }
 
@@ -54,7 +54,7 @@ float url_URI_Get_Callback(int id, float status, string data)
                e.url_rbuf = buf_create();
                if(e.url_rbuf < 0)
                {
-                       print("url_URI_Get_Callback: out of memory in buf_create\n");
+                       LOG_INFO("url_URI_Get_Callback: out of memory in buf_create\n");
                        e.url_ready(e, e.url_ready_pass, URL_READY_ERROR);
                        strunzone(e.url_url);
                        remove(e);
@@ -63,7 +63,7 @@ float url_URI_Get_Callback(int id, float status, string data)
                e.url_rbufpos = 0;
                if(e.url_rbuf < 0)
                {
-                       print("url_URI_Get_Callback: out of memory in buf_create\n");
+                       LOG_INFO("url_URI_Get_Callback: out of memory in buf_create\n");
                        e.url_ready(e, e.url_ready_pass, URL_READY_ERROR);
                        strunzone(e.url_url);
                        remove(e);
@@ -105,7 +105,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                e.url_wbuf = buf_create();
                                if(e.url_wbuf < 0)
                                {
-                                       print("url_single_fopen: out of memory in buf_create\n");
+                                       LOG_INFO("url_single_fopen: out of memory in buf_create\n");
                                        rdy(e, pass, URL_READY_ERROR);
                                        strunzone(e.url_url);
                                        remove(e);
@@ -132,7 +132,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                                        break;
                                        if(i >= autocvar__urllib_nextslot)
                                        {
-                                               print("url_single_fopen: too many concurrent requests\n");
+                                               LOG_INFO("url_single_fopen: too many concurrent requests\n");
                                                rdy(NULL, pass, URL_READY_ERROR);
                                                return;
                                        }
@@ -141,7 +141,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                // GET the data
                                if(!crypto_uri_postbuf(url, i + MIN_URL_ID, string_null, string_null, -1, 0))
                                {
-                                       print("url_single_fopen: failure in crypto_uri_postbuf\n");
+                                       LOG_INFO("url_single_fopen: failure in crypto_uri_postbuf\n");
                                        rdy(NULL, pass, URL_READY_ERROR);
                                        return;
                                }
@@ -179,7 +179,7 @@ void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
                                rdy(e, pass, URL_READY_CANWRITE);
                                break;
                        case FILE_READ:
-                               print("url_single_fopen: cannot open '-' for reading\n");
+                               LOG_INFO("url_single_fopen: cannot open '-' for reading\n");
                                rdy(NULL, pass, URL_READY_ERROR);
                                break;
                }
@@ -235,7 +235,7 @@ void url_fclose(entity e)
                                                break;
                                if(i >= autocvar__urllib_nextslot)
                                {
-                                       print("url_fclose: too many concurrent requests\n");
+                                       LOG_INFO("url_fclose: too many concurrent requests\n");
                                        e.url_ready(e,e.url_ready_pass, URL_READY_ERROR);
                                        buf_del(e.url_wbuf);
                                        strunzone(e.url_url);
@@ -247,7 +247,7 @@ void url_fclose(entity e)
                        // POST the data
                        if(!crypto_uri_postbuf(e.url_url, i + MIN_URL_ID, "text/plain", "", e.url_wbuf, 0))
                        {
-                               print("url_fclose: failure in crypto_uri_postbuf\n");
+                               LOG_INFO("url_fclose: failure in crypto_uri_postbuf\n");
                                e.url_ready(e, e.url_ready_pass, URL_READY_ERROR);
                                buf_del(e.url_wbuf);
                                strunzone(e.url_url);
@@ -328,7 +328,7 @@ void url_fputs(entity e, string s)
        else if(e.url_fh == URL_FH_STDOUT)
        {
                // stdout
-               print(s);
+               LOG_INFO(s);
        }
        else
        {
@@ -345,7 +345,7 @@ void url_multi_ready(entity fh, entity me, float status)
        {
                if(status == -422) // Unprocessable Entity
                {
-                       print("uri_multi_ready: got HTTP error 422, data is in unusable format - not continuing\n");
+                       LOG_INFO("uri_multi_ready: got HTTP error 422, data is in unusable format - not continuing\n");
                        me.url_ready(fh, me.url_ready_pass, status);
                        strunzone(me.url_url);
                        remove(me);
@@ -371,7 +371,7 @@ void url_multi_fopen(string url, int mode, url_ready_func rdy, entity pass)
        n = tokenize_console(url);
        if(n <= 0)
        {
-               print("url_multi_fopen: need at least one URL\n");
+               LOG_INFO("url_multi_fopen: need at least one URL\n");
                rdy(NULL, pass, URL_READY_ERROR);
                return;
        }
index 3f3f72f5753f61a291966d325f64ea0481d53bd3..8b12a7b7ddbe6289b0f722ed661ab468a954a9ea 100644 (file)
@@ -16,21 +16,21 @@ void _dumptree_open(entity pass, entity me)
                s = me.classname;
        else
                s = strcat(me.classname, ": ", s);
-       print(_dumptree_space, etos(me), " (", s, ")");
+       LOG_INFO(_dumptree_space, etos(me), " (", s, ")");
        if(me.firstChild)
        {
-               print(" {\n");
+               LOG_INFO(" {\n");
                _dumptree_space = strcat(_dumptree_space, "  ");
        }
        else
-               print("\n");
+               LOG_INFO("\n");
 }
 void _dumptree_close(entity pass, entity me)
 {
        if(me.firstChild)
        {
                _dumptree_space = substring(_dumptree_space, 0, strlen(_dumptree_space) - 2);
-               print(_dumptree_space, "}\n");
+               LOG_INFO(_dumptree_space, "}\n");
        }
 }
 
@@ -43,11 +43,11 @@ void GameCommand(string theCommand)
 
        if(argv(0) == "help" || argc == 0)
        {
-               print(_("Usage: menu_cmd command..., where possible commands are:\n"));
-               print(_("  sync - reloads all cvars on the current menu page\n"));
-               print(_("  directmenu ITEM - select a menu item as main item\n"));
+               LOG_INFO(_("Usage: menu_cmd command..., where possible commands are:\n"));
+               LOG_INFO(_("  sync - reloads all cvars on the current menu page\n"));
+               LOG_INFO(_("  directmenu ITEM - select a menu item as main item\n"));
 
-               print("\nGeneric commands shared by all programs:\n");
+               LOG_INFO("\nGeneric commands shared by all programs:\n");
                GenericCommand_macro_help();
 
                return;
@@ -76,7 +76,7 @@ void GameCommand(string theCommand)
 
                if(argc == 1)
                {
-                       print(_("Available options:\n"));
+                       LOG_INFO(_("Available options:\n"));
                        float i;
                        entity e;
                        string s;
@@ -91,7 +91,7 @@ void GameCommand(string theCommand)
                                                        continue;
                                                s = substring(s, strlen(filter), strlen(s) - strlen(filter));
                                        }
-                                       print(strcat(" ", s ,"\n"));
+                                       LOG_INFO(strcat(" ", s ,"\n"));
                                        ++i;
                                }
                }
@@ -130,5 +130,5 @@ void GameCommand(string theCommand)
                return;
        }
 
-       print(_("Invalid command. For a list of supported commands, try menu_cmd help.\n"));
+       LOG_INFO(_("Invalid command. For a list of supported commands, try menu_cmd help.\n"));
 }
index 2796c05706d0647662ebff6c4dafd88ac5c24b7b..7edc6eff50d8a4c172371d19c026e10fecba6b46 100644 (file)
@@ -281,7 +281,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) {
-               dprint("Drawing zero size text?\n");
+               LOG_TRACE("Drawing zero size text?\n");
                return;
        }
 
index 45a5a7fac44461aefa6e9e5984d0f1ae80a22050..e02642f69d54da9d134db6acb898c470c87a237f 100644 (file)
@@ -81,7 +81,7 @@ void Label_recalcPositionWithText(entity me, string t)
                        me.realOrigin_x = me.keepspaceLeft;
                if(!me.overrideCondenseFactor)
                        me.condenseFactor = spaceAvail / spaceUsed;
-               dprintf("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\n", t, me.condenseFactor);
        }
 
        if(!me.overrideRealOrigin_y)
index d01f6f7d4d0d2f986a288f1de66b2948219ba777..89966dde15a41a017a70e7fef9b09e8bc8c50c5e 100644 (file)
@@ -63,7 +63,7 @@ void m_init()
        cvar_set("_menu_prvm_language", prvm_language);
 
 #ifdef WATERMARK
-       dprintf("^4MQC Build information: ^1%s\n", WATERMARK);
+       LOG_TRACEF("^4MQC Build information: ^1%s\n", WATERMARK);
 #endif
 
        // list all game dirs (TEST)
@@ -76,7 +76,7 @@ void m_init()
                        s = getgamedirinfo(i, GETGAMEDIRINFO_NAME);
                        if (!s)
                                break;
-                       dprint(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION));
+                       LOG_TRACE(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION));
                }
        }
 
@@ -252,7 +252,7 @@ void m_keyup (float key, float ascii)
                if(mouseButtonsPressed < 0)
                {
                        mouseButtonsPressed = 0;
-                       dprint("Warning: released an already released button\n");
+                       LOG_TRACE("Warning: released an already released button\n");
                }
        }
        if(key == K_ALT) menuShiftState -= (menuShiftState & S_ALT);
@@ -303,7 +303,7 @@ void m_keydown(float key, float ascii)
                if(mouseButtonsPressed > 10)
                {
                        mouseButtonsPressed = 10;
-                       dprint("Warning: pressed an already pressed button\n");
+                       LOG_TRACE("Warning: pressed an already pressed button\n");
                }
        }
        if(key == K_ALT) menuShiftState |= S_ALT;
index 10c81e7ef34bbec061df61789857970764025c1f..ebb622b0a1ecb89e9eb8c599362515576344a609 100644 (file)
@@ -20,7 +20,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: dprint("Invalid key in skin file: ", key, "\n"); } }
+#define SKINEND case "": break; case "//": break; default: LOG_TRACE("Invalid key in skin file: ", key, "\n"); } }
 #include "skin-customizables.inc"
 #undef SKINEND
 #undef SKINSTRING
index a9379e7e83643a74d4c7d07fc0a3916cd47b4b00..843acad9082f9db87c3a828bbd70f145409eca3c 100644 (file)
@@ -345,7 +345,7 @@ void MapList_LoadMap(entity btn, entity me)
        m = MapInfo_BSPName_ByID(i);
        if (!m)
        {
-               print(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n"));
+               LOG_INFO(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n"));
                me.refilter(me);
                return;
        }
@@ -358,7 +358,7 @@ void MapList_LoadMap(entity btn, entity me)
        }
        else
        {
-               print(_("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n"));
+               LOG_INFO(_("Huh? Can't play this (invalid game type). Refiltering so this won't happen again.\n"));
                me.refilter(me);
                return;
        }
index c72db26bbae9ab7c1730bbd2426714772e64352c..8aa5c105e895d097c955f787bb844b0349460848 100644 (file)
@@ -206,7 +206,7 @@ void RegisterSLCategories()
                                } \
                                else \
                                { \
-                                       printf( \
+                                       LOG_INFOF( \
                                                "RegisterSLCategories(): Improper override '%s' for category '%s'!\n", \
                                                s, \
                                                categories[i].cat_name \
@@ -373,7 +373,7 @@ int CheckCategoryForEntry(int entry)
                        case "cts":
                        case "xdf": { return CAT_DEFRAG; }
 
-                       default: { dprintf("Found strange mod type: %s\n", modtype); return CAT_MODIFIED; }
+                       default: { LOG_TRACEF("Found strange mod type: %s\n", modtype); return CAT_MODIFIED; }
                }
        }
 
index 1a5f754db83221e8f3e15bc8f55b788bb736097a..c849254e8b85c66a925a5f2d8bcdc28b1d285bbb 100644 (file)
@@ -111,7 +111,7 @@ void XonoticSkinList_getSkins(entity me)
                fh = fopen(language_filename(s), FILE_READ);
                if(fh < 0)
                {
-                       print("Warning: can't open skinvalues.txt file\n");
+                       LOG_INFO("Warning: can't open skinvalues.txt file\n");
                        continue;
                }
                while((s = fgets(fh)))
index b40488ef4b9b100247a672dce46ba1cd21549fb9..eabbaf16d5d5c6f376048a3df0bb51be1dcd2dbf 100644 (file)
@@ -98,7 +98,7 @@ void _TEST_XonoticDecibelsSlider()
                float v = fromDecibelOfSquare(db, -40);
                float dbv = toDecibelOfSquare(v, -40);
                float d = dbv - db;
-               printf("%f -> %f -> %f (diff: %f)\n", db, v, dbv, d);
+               LOG_INFOF("%f -> %f -> %f (diff: %f)\n", db, v, dbv, d);
                TEST_Check(fabs(d) > 0.02);
        }
        TEST_OK();
index 1857621b4902be90e9499c508a92c48328801c3c..93291ea1d35654fcea58258a24161c6a90ef1310 100644 (file)
@@ -57,8 +57,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
-       dprint("min factor: ", ftos(minfactor), "\n");
-       dprint("max factor: ", ftos(maxfactor), "\n");
+       LOG_TRACE("min factor: ", ftos(minfactor), "\n");
+       LOG_TRACE("max factor: ", ftos(maxfactor), "\n");
 
        if(sz < 0)
                f = 1 - (maxfactor - 1) * sz;
@@ -166,7 +166,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);
-               dprint("Added system resolutions.\n");
+               LOG_TRACE("Added system resolutions.\n");
        }
 
        if(me.nValues == 0)
@@ -201,9 +201,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
-               dprint("Added default resolutions.\n");
+               LOG_TRACE("Added default resolutions.\n");
        }
-       dprint("Total number of resolutions detected: ", ftos(me.nValues), "\n");
+       LOG_TRACE("Total number of resolutions detected: ", ftos(me.nValues), "\n");
 
        me.vid_fullscreen = fullscreen;
 
index 3c4b09e1463b6489ab69e04fa2bd2324b459a432..4a6e03f28e91c44314817782c3f0a20f5aa5576c 100644 (file)
@@ -81,7 +81,7 @@ string XonoticStatsList_convertDate(string input)
 
 void XonoticStatsList_getStats(entity me)
 {
-       dprint("XonoticStatsList_getStats() at time: ", ftos(time), "\n");
+       LOG_TRACE("XonoticStatsList_getStats() at time: ", ftos(time), "\n");
        // delete the old buffer if it exists
        if(me.listStats >= 0)
                buf_del(me.listStats);
index a5fa9da4760e89cea5a872aed9ef95e6ee9c0b8e..d2bf9c92023e67891226a2eef6d8a2ee4f8f1a32 100644 (file)
@@ -46,7 +46,7 @@ string getZonedTooltipForIdentifier(string s)
                if(t != "" && t != "custom cvar")
                        return strzone(t);
        }
-       dprint("WARNING: no tooltip set for ", s, "\n");
+       LOG_TRACE("WARNING: no tooltip set for ", s, "\n");
        return string_null;
 }
 
@@ -303,7 +303,7 @@ void URI_Get_Callback(float id, float status, string data)
        }
        else
        {
-               printf("Received HTTP request data for an invalid id %d.\n", id);
+               LOG_INFOF("Received HTTP request data for an invalid id %d.\n", id);
        }
 }
 
@@ -318,22 +318,22 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
 
        if(_Nex_ExtResponseSystem_UpdateTo)
        {
-               dprint("error: UpdateNotification_URI_Get_Callback has been called before\n");
+               LOG_TRACE("error: UpdateNotification_URI_Get_Callback has been called before\n");
                return;
        }
        if(status != 0)
        {
-               dprintf("error receiving update notification: status is %d\n", status);
+               LOG_TRACEF("error receiving update notification: status is %d\n", status);
                return;
        }
        if(substring(data, 0, 1) == "<")
        {
-               dprint("error: received HTML instead of an update notification\n");
+               LOG_TRACE("error: received HTML instead of an update notification\n");
                return;
        }
        if(strstrofs(data, "\r", 0) != -1)
        {
-               dprint("error: received carriage returns from update notification server\n");
+               LOG_TRACE("error: received carriage returns from update notification server\n");
                return;
        }
 
@@ -411,7 +411,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
                {
                        // update needed
                        _Nex_ExtResponseSystem_UpdateTo = strzone(un_version);
-                       if(un_download) { printf(_("Update can be downloaded at:\n%s\n"), un_download); }
+                       if(un_download) { LOG_INFOF(_("Update can be downloaded at:\n%s\n"), un_download); }
                        if(un_url) { _Nex_ExtResponseSystem_UpdateToURL = strzone(un_url); }
                        DisableServerBackwardsCompatibility();
                }
@@ -642,7 +642,7 @@ float updateCompression()
                cvar_set("gl_texturecompression", "1");
                cvar_set("r_texture_dds_load", "1");
                if(!can_dds)
-                       print(_("^1ERROR: Texture compression is required but not supported.\n^1Expect visual problems.\n"));
+                       LOG_INFO(_("^1ERROR: Texture compression is required but not supported.\n^1Expect visual problems.\n"));
                return 0;
        }
        else
@@ -809,7 +809,7 @@ void CheckSendCvars(entity me, string cvarnamestring)
 {
        if(me.sendCvars)
        {
-               printf("Sending cvar: %s -> %s\n", cvarnamestring, cvar_string(cvarnamestring));
+               LOG_INFOF("Sending cvar: %s -> %s\n", cvarnamestring, cvar_string(cvarnamestring));
                if(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
                {
                        cmd(sprintf("\nsendcvar %s\n", cvarnamestring));
index 6ec1756ed643851ff2ed574822960e63a2e798f3..f874b616b25a8045311c028bf9abde739d1f84e7 100644 (file)
@@ -1,4 +1,4 @@
-void dprint(string s, ...) = #25;
+void LOG_TRACE(string s, ...) = #25;
 string ftos(float f) = #26;
 string vtos(vector v) = #27;
 void error(string e) = #10;
@@ -7,7 +7,7 @@ float test();
 void spawnfunc_worldspawn()
 {
        float r;
-       dprint("TESTCASE: START\n");
+       LOG_TRACE("TESTCASE: START\n");
        r = test();
        if(r == 1)
                error("TESTCASE: PASS");
index e0dbdae26875b5537345ccd77ad359ec56998e45..5549778be82c2f50ce7928b3e5fe5e6bd6f52557 100644 (file)
@@ -343,12 +343,12 @@ float bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float a
        shotspeedupward *= W_WeaponSpeedFactor();
        if (!shotspeed)
        {
-               dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
+               LOG_TRACE("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
                shotspeed = 1000000;
        }
        if (!maxshottime)
        {
-               dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " maxshottime is zero!\n");
+               LOG_TRACE("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " maxshottime is zero!\n");
                maxshottime = 1;
        }
        makevectors(self.v_angle);
index e42a50f6d4a9ccb8abad44d3b3db2511a13a06a6..64f5eb7d4ce3a026c7175631066dac3ae202419b 100644 (file)
@@ -156,7 +156,7 @@ void bot_setnameandstuff()
 
        if(file < 0)
        {
-               print(strcat("Error: Can not open the bot configuration file '",autocvar_bot_config_file,"'\n"));
+               LOG_INFO(strcat("Error: Can not open the bot configuration file '",autocvar_bot_config_file,"'\n"));
                readfile = "";
        }
        else
@@ -383,7 +383,7 @@ void bot_relinkplayerlist()
                }
                e = e.chain;
        }
-       dprint(strcat("relink: ", ftos(currentbots), " bots seen.\n"));
+       LOG_TRACE(strcat("relink: ", ftos(currentbots), " bots seen.\n"));
        bot_strategytoken = bot_list;
        bot_strategytoken_taken = true;
 }
@@ -524,18 +524,18 @@ void autoskill(float factor)
                        bestbot = max(bestbot, head.totalfrags - head.totalfrags_lastcheck);
        }
 
-       dprint("autoskill: best player got ", ftos(bestplayer), ", ");
-       dprint("best bot got ", ftos(bestbot), "; ");
+       LOG_TRACE("autoskill: best player got ", ftos(bestplayer), ", ");
+       LOG_TRACE("best bot got ", ftos(bestbot), "; ");
        if(bestbot < 0 || bestplayer < 0)
        {
-               dprint("not doing anything\n");
+               LOG_TRACE("not doing anything\n");
                // don't return, let it reset all counters below
        }
        else if(bestbot <= bestplayer * factor - 2)
        {
                if(autocvar_skill < 17)
                {
-                       dprint("2 frags difference, increasing skill\n");
+                       LOG_TRACE("2 frags difference, increasing skill\n");
                        cvar_set("skill", ftos(autocvar_skill + 1));
                        bprint("^2SKILL UP!^7 Now at level ", ftos(autocvar_skill), "\n");
                }
@@ -544,14 +544,14 @@ void autoskill(float factor)
        {
                if(autocvar_skill > 0)
                {
-                       dprint("2 frags difference, decreasing skill\n");
+                       LOG_TRACE("2 frags difference, decreasing skill\n");
                        cvar_set("skill", ftos(autocvar_skill - 1));
                        bprint("^1SKILL DOWN!^7 Now at level ", ftos(autocvar_skill), "\n");
                }
        }
        else
        {
-               dprint("not doing anything\n");
+               LOG_TRACE("not doing anything\n");
                return;
                // don't reset counters, wait for them to accumulate
        }
index fcf1c04d29cda938cd5f8e3454bf1fc2150a13e7..5796fe60163346a5023ede6a39b4b560dc6bfa88 100644 (file)
@@ -537,7 +537,7 @@ void havocbot_movetogoal()
                                threshold = maxspeed * 0.2;
                                if(sxy < threshold)
                                {
-                                       dprint("Warning: ", self.netname, " got stuck on a jumppad (velocity in xy is ", ftos(sxy), "), trying to get out of it now\n");
+                                       LOG_TRACE("Warning: ", self.netname, " got stuck on a jumppad (velocity in xy is ", ftos(sxy), "), trying to get out of it now\n");
                                        self.aistatus |= AI_STATUS_OUT_JUMPPAD;
                                }
                                return;
@@ -788,7 +788,7 @@ void havocbot_movetogoal()
                                                if(tracebox_hits_trigger_hurt(dst_ahead, self.mins, self.maxs, trace_endpos))
                                                {
                                                        // Remove dangerous dynamic goals from stack
-                                                       dprint("bot ", self.netname, " avoided the goal ", self.goalcurrent.classname, " ", etos(self.goalcurrent), " because it led to a dangerous path; goal stack cleared\n");
+                                                       LOG_TRACE("bot ", self.netname, " avoided the goal ", self.goalcurrent.classname, " ", etos(self.goalcurrent), " because it led to a dangerous path; goal stack cleared\n");
                                                        navigation_clearroute();
                                                        return;
                                                }
@@ -1117,7 +1117,7 @@ float havocbot_moveto(vector pos)
                // Step 4: Move to waypoint
                if(self.havocbot_personal_waypoint==world)
                {
-                       dprint("Error: ", self.netname, " trying to walk to a non existent personal waypoint\n");
+                       LOG_TRACE("Error: ", self.netname, " trying to walk to a non existent personal waypoint\n");
                        self.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_GOING;
                        return CMD_STATUS_ERROR;
                }
@@ -1128,7 +1128,7 @@ float havocbot_moveto(vector pos)
                        bot_strategytoken_taken = true;
                        if(havocbot_moveto_refresh_route())
                        {
-                               dprint(self.netname, " walking to its personal waypoint (after ", ftos(self.havocbot_personal_waypoint_failcounter), " failed attempts)\n");
+                               LOG_TRACE(self.netname, " walking to its personal waypoint (after ", ftos(self.havocbot_personal_waypoint_failcounter), " failed attempts)\n");
                                self.havocbot_personal_waypoint_searchtime = time + 10;
                                self.havocbot_personal_waypoint_failcounter = 0;
                        }
@@ -1138,13 +1138,13 @@ float havocbot_moveto(vector pos)
                                self.havocbot_personal_waypoint_searchtime = time + 2;
                                if(self.havocbot_personal_waypoint_failcounter >= 30)
                                {
-                                       dprint("Warning: can't walk to the personal waypoint located at ", vtos(self.havocbot_personal_waypoint.origin),"\n");
+                                       LOG_TRACE("Warning: can't walk to the personal waypoint located at ", vtos(self.havocbot_personal_waypoint.origin),"\n");
                                        self.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_LINKING;
                                        remove(self.havocbot_personal_waypoint);
                                        return CMD_STATUS_ERROR;
                                }
                                else
-                                       dprint(self.netname, " can't walk to its personal waypoint (after ", ftos(self.havocbot_personal_waypoint_failcounter), " failed attempts), trying later\n");
+                                       LOG_TRACE(self.netname, " can't walk to its personal waypoint (after ", ftos(self.havocbot_personal_waypoint_failcounter), " failed attempts), trying later\n");
                        }
                }
 
@@ -1162,7 +1162,7 @@ float havocbot_moveto(vector pos)
                if(self.aistatus & AI_STATUS_WAYPOINT_PERSONAL_REACHED)
                {
                        // Step 5: Waypoint reached
-                       dprint(self.netname, "'s personal waypoint reached\n");
+                       LOG_TRACE(self.netname, "'s personal waypoint reached\n");
                        remove(self.havocbot_personal_waypoint);
                        self.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_REACHED;
                        return CMD_STATUS_FINISHED;
@@ -1177,7 +1177,7 @@ float havocbot_moveto(vector pos)
                // Wait until it is linked
                if(!self.havocbot_personal_waypoint.wplinked)
                {
-                       dprint(self.netname, " waiting for personal waypoint to be linked\n");
+                       LOG_TRACE(self.netname, " waiting for personal waypoint to be linked\n");
                        return CMD_STATUS_EXECUTING;
                }
 
@@ -1186,7 +1186,7 @@ float havocbot_moveto(vector pos)
                self.aistatus |= AI_STATUS_WAYPOINT_PERSONAL_GOING;
 
                // Step 3: Route to waypoint
-               dprint(self.netname, " walking to its personal waypoint\n");
+               LOG_TRACE(self.netname, " walking to its personal waypoint\n");
 
                return CMD_STATUS_EXECUTING;
        }
@@ -1195,7 +1195,7 @@ float havocbot_moveto(vector pos)
        wp = waypoint_spawnpersonal(pos);
        if(wp==world)
        {
-               dprint("Error: Can't spawn personal waypoint at ",vtos(pos),"\n");
+               LOG_TRACE("Error: Can't spawn personal waypoint at ",vtos(pos),"\n");
                return CMD_STATUS_ERROR;
        }
 
index ea163f4efb56cdd0f9e67b339206573fbe48cedf..63888e45fc5f8d81af0ccf7734f91f02ce620b04 100644 (file)
@@ -50,7 +50,7 @@ void havocbot_role_kh_carrier()
 
        if (!(self.kh_next))
        {
-               dprint("changing role to freelancer\n");
+               LOG_TRACE("changing role to freelancer\n");
                self.havocbot_role = havocbot_role_kh_freelancer;
                self.havocbot_role_timeout = 0;
                return;
@@ -77,7 +77,7 @@ void havocbot_role_kh_defense()
 
        if (self.kh_next)
        {
-               dprint("changing role to carrier\n");
+               LOG_TRACE("changing role to carrier\n");
                self.havocbot_role = havocbot_role_kh_carrier;
                self.havocbot_role_timeout = 0;
                return;
@@ -87,7 +87,7 @@ void havocbot_role_kh_defense()
                self.havocbot_role_timeout = time + random() * 10 + 20;
        if (time > self.havocbot_role_timeout)
        {
-               dprint("changing role to freelancer\n");
+               LOG_TRACE("changing role to freelancer\n");
                self.havocbot_role = havocbot_role_kh_freelancer;
                self.havocbot_role_timeout = 0;
                return;
@@ -118,7 +118,7 @@ void havocbot_role_kh_offense()
 
        if (self.kh_next)
        {
-               dprint("changing role to carrier\n");
+               LOG_TRACE("changing role to carrier\n");
                self.havocbot_role = havocbot_role_kh_carrier;
                self.havocbot_role_timeout = 0;
                return;
@@ -128,7 +128,7 @@ void havocbot_role_kh_offense()
                self.havocbot_role_timeout = time + random() * 10 + 20;
        if (time > self.havocbot_role_timeout)
        {
-               dprint("changing role to freelancer\n");
+               LOG_TRACE("changing role to freelancer\n");
                self.havocbot_role = havocbot_role_kh_freelancer;
                self.havocbot_role_timeout = 0;
                return;
@@ -160,7 +160,7 @@ void havocbot_role_kh_freelancer()
 
        if (self.kh_next)
        {
-               dprint("changing role to carrier\n");
+               LOG_TRACE("changing role to carrier\n");
                self.havocbot_role = havocbot_role_kh_carrier;
                self.havocbot_role_timeout = 0;
                return;
@@ -172,12 +172,12 @@ void havocbot_role_kh_freelancer()
        {
                if (random() < 0.5)
                {
-                       dprint("changing role to offense\n");
+                       LOG_TRACE("changing role to offense\n");
                        self.havocbot_role = havocbot_role_kh_offense;
                }
                else
                {
-                       dprint("changing role to defense\n");
+                       LOG_TRACE("changing role to defense\n");
                        self.havocbot_role = havocbot_role_kh_defense;
                }
                self.havocbot_role_timeout = 0;
index bfa8f8436c3e5c30d47894ae5d0b51fa75806039..593488e4425e96259e15a2d2b228d0c7223da452 100644 (file)
@@ -239,7 +239,7 @@ void havocbot_chooserole_dm()
 
 void havocbot_chooserole()
 {
-       dprint("choosing a role...\n");
+       LOG_TRACE("choosing a role...\n");
        self.bot_strategytime = 0;
        if (MUTATOR_CALLHOOK(HavocBot_ChooseRole, self))
                return;
index ad0a8d761d4bdfff7a8aca640ebc8c6ddf8b8d51..72729ec8671bdbcf8a264295188ba89531f00b7d 100644 (file)
@@ -13,8 +13,8 @@ void bot_debug(string input)
 {
        switch(autocvar_bot_debug)
        {
-               case 1: dprint(input); break;
-               case 2: print(input); break;
+               case 1: LOG_TRACE(input); break;
+               case 2: LOG_INFO(input); break;
        }
 }
 
index b1425c1a821dadaf447b5d291c539079e3fc83bb..a8dc92171746325702c23c1676d26bfd78c53fab 100644 (file)
@@ -14,7 +14,7 @@ void bot_clearqueue(entity bot)
                return;
        buf_del(bot.bot_cmdqueuebuf);
        bot.bot_cmdqueuebuf_allocated = false;
-       dprint("bot ", bot.netname, " queue cleared\n");
+       LOG_TRACE("bot ", bot.netname, " queue cleared\n");
 }
 
 void bot_queuecommand(entity bot, string cmdstring)
@@ -123,7 +123,7 @@ entity bot_getplace(string placename)
                }
                e = find(world, targetname, s);
                if(!e)
-                       print("invalid place ", s, "\n");
+                       LOG_INFO("invalid place ", s, "\n");
                if(i < MAX_BOT_PLACES)
                {
                        self.(bot_placenames[i]) = strzone(placename);
@@ -136,7 +136,7 @@ entity bot_getplace(string placename)
        {
                e = find(world, targetname, placename);
                if(!e)
-                       print("invalid place ", placename, "\n");
+                       LOG_INFO("invalid place ", placename, "\n");
                return e;
        }
 }
@@ -292,7 +292,7 @@ float bot_decodecommand(string cmdstring)
 
                if(cmd_parm_type!=BOT_CMD_PARAMETER_NONE&&parm=="")
                {
-                       print("ERROR: A parameter is required for this command\n");
+                       LOG_INFO("ERROR: A parameter is required for this command\n");
                        return 0;
                }
 
@@ -318,7 +318,7 @@ float bot_decodecommand(string cmdstring)
                }
                return 1;
        }
-       print("ERROR: No such command '", cmdstring, "'\n");
+       LOG_INFO("ERROR: No such command '", cmdstring, "'\n");
        return 0;
 }
 
@@ -353,87 +353,87 @@ void bot_cmdhelp(string scmd)
                                break;
                }
 
-               print(strcat("Command: ",bot_cmd_string[i],"\nParameter: <",stype,"> \n"));
+               LOG_INFO(strcat("Command: ",bot_cmd_string[i],"\nParameter: <",stype,"> \n"));
 
-               print("Description: ");
+               LOG_INFO("Description: ");
                switch(i)
                {
                        case BOT_CMD_PAUSE:
-                               print("Stops the bot completely. Any command other than 'continue' will be ignored.");
+                               LOG_INFO("Stops the bot completely. Any command other than 'continue' will be ignored.");
                                break;
                        case BOT_CMD_CONTINUE:
-                               print("Disable paused status");
+                               LOG_INFO("Disable paused status");
                                break;
                        case BOT_CMD_WAIT:
-                               print("Pause command parsing and bot ai for N seconds. Pressed key will remain pressed");
+                               LOG_INFO("Pause command parsing and bot ai for N seconds. Pressed key will remain pressed");
                                break;
                        case BOT_CMD_WAIT_UNTIL:
-                               print("Pause command parsing and bot ai until time is N from the last barrier. Pressed key will remain pressed");
+                               LOG_INFO("Pause command parsing and bot ai until time is N from the last barrier. Pressed key will remain pressed");
                                break;
                        case BOT_CMD_BARRIER:
-                               print("Waits till all bots that have a command queue reach this command. Pressed key will remain pressed");
+                               LOG_INFO("Waits till all bots that have a command queue reach this command. Pressed key will remain pressed");
                                break;
                        case BOT_CMD_TURN:
-                               print("Look to the right or left N degrees. For turning to the left use positive numbers.");
+                               LOG_INFO("Look to the right or left N degrees. For turning to the left use positive numbers.");
                                break;
                        case BOT_CMD_MOVETO:
-                               print("Walk to an specific coordinate on the map. Usage: moveto \"x y z\"");
+                               LOG_INFO("Walk to an specific coordinate on the map. Usage: moveto \"x y z\"");
                                break;
                        case BOT_CMD_MOVETOTARGET:
-                               print("Walk to the specific target on the map");
+                               LOG_INFO("Walk to the specific target on the map");
                                break;
                        case BOT_CMD_RESETGOAL:
-                               print("Resets the goal stack");
+                               LOG_INFO("Resets the goal stack");
                                break;
                        case BOT_CMD_CC:
-                               print("Execute client command. Examples: cc \"say something\"; cc god; cc \"name newnickname\"; cc kill;");
+                               LOG_INFO("Execute client command. Examples: cc \"say something\"; cc god; cc \"name newnickname\"; cc kill;");
                                break;
                        case BOT_CMD_IF:
-                               print("Perform simple conditional execution.\n");
-                               print("Syntax: \n");
-                               print("        sv_cmd .. if \"condition\"\n");
-                               print("        sv_cmd ..        <instruction if true>\n");
-                               print("        sv_cmd ..        <instruction if true>\n");
-                               print("        sv_cmd .. else\n");
-                               print("        sv_cmd ..        <instruction if false>\n");
-                               print("        sv_cmd ..        <instruction if false>\n");
-                               print("        sv_cmd .. fi\n");
-                               print("Conditions: a=b, a>b, a<b, a\t\t(spaces not allowed)\n");
-                               print("            Values in conditions can be numbers, cvars in the form cvar.cvar_string or special fields\n");
-                               print("Fields: health, speed, flagcarrier\n");
-                               print("Examples: if health>50; if health>cvar.g_balance_laser_primary_damage; if flagcarrier;");
+                               LOG_INFO("Perform simple conditional execution.\n");
+                               LOG_INFO("Syntax: \n");
+                               LOG_INFO("        sv_cmd .. if \"condition\"\n");
+                               LOG_INFO("        sv_cmd ..     <instruction if true>\n");
+                               LOG_INFO("        sv_cmd ..     <instruction if true>\n");
+                               LOG_INFO("        sv_cmd .. else\n");
+                               LOG_INFO("        sv_cmd ..     <instruction if false>\n");
+                               LOG_INFO("        sv_cmd ..     <instruction if false>\n");
+                               LOG_INFO("        sv_cmd .. fi\n");
+                               LOG_INFO("Conditions: a=b, a>b, a<b, a\t\t(spaces not allowed)\n");
+                               LOG_INFO("            Values in conditions can be numbers, cvars in the form cvar.cvar_string or special fields\n");
+                               LOG_INFO("Fields: health, speed, flagcarrier\n");
+                               LOG_INFO("Examples: if health>50; if health>cvar.g_balance_laser_primary_damage; if flagcarrier;");
                                break;
                        case BOT_CMD_RESETAIM:
-                               print("Points the aim to the coordinates x,y 0,0");
+                               LOG_INFO("Points the aim to the coordinates x,y 0,0");
                                break;
                        case BOT_CMD_AIM:
-                               print("Move the aim x/y (horizontal/vertical) degrees relatives to the bot\n");
-                               print("There is a 3rd optional parameter telling in how many seconds the aim has to reach the new position\n");
-                               print("Examples: aim \"90 0\"   // Turn 90 degrees inmediately (positive numbers move to the left/up)\n");
-                               print("          aim \"0 90 2\" // Will gradually look to the sky in the next two seconds");
+                               LOG_INFO("Move the aim x/y (horizontal/vertical) degrees relatives to the bot\n");
+                               LOG_INFO("There is a 3rd optional parameter telling in how many seconds the aim has to reach the new position\n");
+                               LOG_INFO("Examples: aim \"90 0\"        // Turn 90 degrees inmediately (positive numbers move to the left/up)\n");
+                               LOG_INFO("          aim \"0 90 2\"      // Will gradually look to the sky in the next two seconds");
                                break;
                        case BOT_CMD_AIMTARGET:
-                               print("Points the aim to given target");
+                               LOG_INFO("Points the aim to given target");
                                break;
                        case BOT_CMD_PRESSKEY:
-                               print("Press one of the following keys: forward, backward, left, right, jump, crouch, attack1, attack2, use\n");
-                               print("Multiple keys can be pressed at time (with many presskey calls) and it will remain pressed until the command \"releasekey\" is called");
-                               print("Note: The script will not return the control to the bot ai until all keys are released");
+                               LOG_INFO("Press one of the following keys: forward, backward, left, right, jump, crouch, attack1, attack2, use\n");
+                               LOG_INFO("Multiple keys can be pressed at time (with many presskey calls) and it will remain pressed until the command \"releasekey\" is called");
+                               LOG_INFO("Note: The script will not return the control to the bot ai until all keys are released");
                                break;
                        case BOT_CMD_RELEASEKEY:
-                               print("Release previoulsy used keys. Use the parameter \"all\" to release all keys");
+                               LOG_INFO("Release previoulsy used keys. Use the parameter \"all\" to release all keys");
                                break;
                        case BOT_CMD_SOUND:
-                               print("play sound file at bot location");
+                               LOG_INFO("play sound file at bot location");
                                break;
                        case BOT_CMD_DEBUG_ASSERT_CANFIRE:
-                               print("verify the state of the weapon entity");
+                               LOG_INFO("verify the state of the weapon entity");
                                break;
                        default:
-                               print("This command has no description yet.");
+                               LOG_INFO("This command has no description yet.");
                                break;
                }
-               print("\n");
+               LOG_INFO("\n");
        }
 }
 
@@ -445,8 +445,8 @@ void bot_list_commands()
        if(!bot_cmds_initialized)
                bot_commands_init();
 
-       print("List of all available commands:\n");
-       print("  Command - Parameter Type\n");
+       LOG_INFO("List of all available commands:\n");
+       LOG_INFO("  Command - Parameter Type\n");
 
        for(i=1;i<BOT_CMD_COUNTER;++i)
        {
@@ -465,7 +465,7 @@ void bot_list_commands()
                                ptype = "none";
                                break;
                }
-               print(strcat("  ",bot_cmd_string[i]," - <",ptype,"> \n"));
+               LOG_INFO(strcat("  ",bot_cmd_string[i]," - <",ptype,"> \n"));
        }
 }
 
@@ -617,7 +617,7 @@ float bot_cmd_eval(string expr)
                        return ((self.flagcarried!=world));
        }
 
-       print(strcat("ERROR: Unable to convert the expression '",expr,"' into a numeric value\n"));
+       LOG_INFO(strcat("ERROR: Unable to convert the expression '",expr,"' into a numeric value\n"));
        return 0;
 }
 
@@ -629,7 +629,7 @@ float bot_cmd_if()
        if(self.bot_cmd_condition_status != CMD_CONDITION_NONE)
        {
                // Only one "if" block is allowed at time
-               print("ERROR: Only one conditional block can be processed at time");
+               LOG_INFO("ERROR: Only one conditional block can be processed at time");
                bot_clearqueue(self);
                return CMD_STATUS_ERROR;
        }
@@ -1066,7 +1066,7 @@ float bot_cmd_debug_assert_canfire()
                if(f)
                {
                        self.colormod = '0 8 8';
-                       print("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by weaponentity state\n");
+                       LOG_INFO("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by weaponentity state\n");
                }
        }
        else if(ATTACK_FINISHED(self) > time)
@@ -1074,7 +1074,7 @@ float bot_cmd_debug_assert_canfire()
                if(f)
                {
                        self.colormod = '8 0 8';
-                       print("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by ATTACK_FINISHED (", ftos(ATTACK_FINISHED(self) - time), " seconds left)\n");
+                       LOG_INFO("Bot ", self.netname, " using ", self.weaponname, " wants to fire, inhibited by ATTACK_FINISHED (", ftos(ATTACK_FINISHED(self) - time), " seconds left)\n");
                }
        }
        else if(self.tuba_note)
@@ -1082,7 +1082,7 @@ float bot_cmd_debug_assert_canfire()
                if(f)
                {
                        self.colormod = '8 0 0';
-                       print("Bot ", self.netname, " using ", self.weaponname, " wants to fire, bot still has an active tuba note\n");
+                       LOG_INFO("Bot ", self.netname, " using ", self.weaponname, " wants to fire, bot still has an active tuba note\n");
                }
        }
        else
@@ -1090,7 +1090,7 @@ float bot_cmd_debug_assert_canfire()
                if(!f)
                {
                        self.colormod = '8 8 0';
-                       print("Bot ", self.netname, " using ", self.weaponname, " thinks it has fired, but apparently did not; ATTACK_FINISHED says ", ftos(ATTACK_FINISHED(self) - time), " seconds left\n");
+                       LOG_INFO("Bot ", self.netname, " using ", self.weaponname, " thinks it has fired, but apparently did not; ATTACK_FINISHED says ", ftos(ATTACK_FINISHED(self) - time), " seconds left\n");
                }
        }
 
@@ -1191,7 +1191,7 @@ float bot_execute_commands_once()
                if(bot_cmd.bot_cmd_type!=BOT_CMD_NULL)
                {
                        bot_command_executed(true);
-                       print( "WARNING: Commands are ignored while the bot is paused. Use the command 'continue' instead.\n");
+                       LOG_INFO( "WARNING: Commands are ignored while the bot is paused. Use the command 'continue' instead.\n");
                }
                return 1;
        }
@@ -1289,12 +1289,12 @@ float bot_execute_commands_once()
                        status = bot_cmd_debug_assert_canfire();
                        break;
                default:
-                       print(strcat("ERROR: Invalid command on queue with id '",ftos(bot_cmd.bot_cmd_type),"'\n"));
+                       LOG_INFO(strcat("ERROR: Invalid command on queue with id '",ftos(bot_cmd.bot_cmd_type),"'\n"));
                        return 0;
        }
 
        if (status==CMD_STATUS_ERROR)
-               print(strcat("ERROR: The command '",bot_cmd_string[bot_cmd.bot_cmd_type],"' returned an error status\n"));
+               LOG_INFO(strcat("ERROR: The command '",bot_cmd_string[bot_cmd.bot_cmd_type],"' returned an error status\n"));
 
        // Move execution pointer
        if(status==CMD_STATUS_EXECUTING)
index 627c622d2554de6f9b3a6015f5d8ffaebb2e7066..ca209f9ca7ab4877c3ef0036c2d3756cf076a06f 100644 (file)
@@ -43,7 +43,7 @@ entity waypoint_spawn(vector m1, vector m2, float f)
                {
                        if(!(f & WAYPOINTFLAG_GENERATED))
                        {
-                               dprint("Killed a waypoint that was stuck in solid at ", vtos(w.origin), "\n");
+                               LOG_TRACE("Killed a waypoint that was stuck in solid at ", vtos(w.origin), "\n");
                                remove(w);
                                return world;
                        }
@@ -51,7 +51,7 @@ entity waypoint_spawn(vector m1, vector m2, float f)
                        {
                                if(autocvar_developer)
                                {
-                                       print("A generated waypoint is stuck in solid at ", vtos(w.origin), "\n");
+                                       LOG_INFO("A generated waypoint is stuck in solid at ", vtos(w.origin), "\n");
                                        backtrace("Waypoint stuck");
                                }
                        }
@@ -381,9 +381,9 @@ float waypoint_load_links()
 
        if (file < 0)
        {
-               dprint("waypoint links load from ");
-               dprint(filename);
-               dprint(" failed\n");
+               LOG_TRACE("waypoint links load from ");
+               LOG_TRACE(filename);
+               LOG_TRACE(" failed\n");
                return false;
        }
 
@@ -419,7 +419,7 @@ float waypoint_load_links()
 
                        if(!found)
                        {
-                               dprint("waypoint_load_links: couldn't find 'from' waypoint at ", vtos(wp_from.origin),"\n");
+                               LOG_TRACE("waypoint_load_links: couldn't find 'from' waypoint at ", vtos(wp_from.origin),"\n");
                                continue;
                        }
 
@@ -441,7 +441,7 @@ float waypoint_load_links()
 
                if(!found)
                {
-                       dprint("waypoint_load_links: couldn't find 'to' waypoint at ", vtos(wp_to.origin),"\n");
+                       LOG_TRACE("waypoint_load_links: couldn't find 'to' waypoint at ", vtos(wp_to.origin),"\n");
                        continue;
                }
 
@@ -451,11 +451,11 @@ float waypoint_load_links()
 
        fclose(file);
 
-       dprint("loaded ");
-       dprint(ftos(c));
-       dprint(" waypoint links from maps/");
-       dprint(mapname);
-       dprint(".waypoints.cache\n");
+       LOG_TRACE("loaded ");
+       LOG_TRACE(ftos(c));
+       LOG_TRACE(" waypoint links from maps/");
+       LOG_TRACE(mapname);
+       LOG_TRACE(".waypoints.cache\n");
 
        botframe_cachedwaypointlinks = true;
        return true;
@@ -475,9 +475,9 @@ void waypoint_load_links_hardwired()
 
        if (file < 0)
        {
-               dprint("waypoint links load from ");
-               dprint(filename);
-               dprint(" failed\n");
+               LOG_TRACE("waypoint links load from ");
+               LOG_TRACE(filename);
+               LOG_TRACE(" failed\n");
                return;
        }
 
@@ -515,7 +515,7 @@ void waypoint_load_links_hardwired()
 
                        if(!found)
                        {
-                               print(strcat("NOTICE: Can not find waypoint at ", vtos(wp_from_pos), ". Path skipped\n"));
+                               LOG_INFO(strcat("NOTICE: Can not find waypoint at ", vtos(wp_from_pos), ". Path skipped\n"));
                                continue;
                        }
                }
@@ -536,7 +536,7 @@ void waypoint_load_links_hardwired()
 
                if(!found)
                {
-                       print(strcat("NOTICE: Can not find waypoint at ", vtos(wp_to_pos), ". Path skipped\n"));
+                       LOG_INFO(strcat("NOTICE: Can not find waypoint at ", vtos(wp_to_pos), ". Path skipped\n"));
                        continue;
                }
 
@@ -548,11 +548,11 @@ void waypoint_load_links_hardwired()
 
        fclose(file);
 
-       dprint("loaded ");
-       dprint(ftos(c));
-       dprint(" waypoint links from maps/");
-       dprint(mapname);
-       dprint(".waypoints.hardwired\n");
+       LOG_TRACE("loaded ");
+       LOG_TRACE(ftos(c));
+       LOG_TRACE(" waypoint links from maps/");
+       LOG_TRACE(mapname);
+       LOG_TRACE(".waypoints.hardwired\n");
 }
 
 entity waypoint_get_link(entity w, float i)
@@ -606,9 +606,9 @@ void waypoint_save_links()
        file = fopen(filename, FILE_WRITE);
        if (file < 0)
        {
-               print("waypoint links save to ");
-               print(filename);
-               print(" failed\n");
+               LOG_INFO("waypoint links save to ");
+               LOG_INFO(filename);
+               LOG_INFO(" failed\n");
        }
        c = 0;
        w = findchain(classname, "waypoint");
@@ -630,11 +630,11 @@ void waypoint_save_links()
        fclose(file);
        botframe_cachedwaypointlinks = true;
 
-       print("saved ");
-       print(ftos(c));
-       print(" waypoints links to maps/");
-       print(mapname);
-       print(".waypoints.cache\n");
+       LOG_INFO("saved ");
+       LOG_INFO(ftos(c));
+       LOG_INFO(" waypoints links to maps/");
+       LOG_INFO(mapname);
+       LOG_INFO(".waypoints.cache\n");
 }
 
 // save waypoints to gamedir/data/maps/mapname.waypoints
@@ -712,19 +712,19 @@ float waypoint_loadall()
                                cwb = cwb + 1;
                }
                fclose(file);
-               dprint("loaded ");
-               dprint(ftos(cwp));
-               dprint(" waypoints and ");
-               dprint(ftos(cwb));
-               dprint(" wayboxes from maps/");
-               dprint(mapname);
-               dprint(".waypoints\n");
+               LOG_TRACE("loaded ");
+               LOG_TRACE(ftos(cwp));
+               LOG_TRACE(" waypoints and ");
+               LOG_TRACE(ftos(cwb));
+               LOG_TRACE(" wayboxes from maps/");
+               LOG_TRACE(mapname);
+               LOG_TRACE(".waypoints\n");
        }
        else
        {
-               dprint("waypoint load from ");
-               dprint(filename);
-               dprint(" failed\n");
+               LOG_TRACE("waypoint load from ");
+               LOG_TRACE(filename);
+               LOG_TRACE(" failed\n");
        }
        return cwp + cwb;
 }
@@ -967,7 +967,7 @@ float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp, .en
                }
                if(bestdist < maxdist)
                {
-                       print("update chain to new nearest WP ", etos(p.(fld)), "\n");
+                       LOG_INFO("update chain to new nearest WP ", etos(p.(fld)), "\n");
                        return 0;
                }
 
@@ -1046,7 +1046,7 @@ float botframe_autowaypoints_fix_from(entity p, float walkfromwp, entity wp, .en
                tmax = t;
        }
 
-       print("spawning a waypoint for connecting to ", etos(wp), "\n");
+       LOG_INFO("spawning a waypoint for connecting to ", etos(wp), "\n");
        botframe_autowaypoints_createwp(o, p, fld, 0);
        return 1;
 }
@@ -1062,7 +1062,7 @@ void botframe_autowaypoints_fix(entity p, float walkfromwp, .entity fld)
        if(r != -1)
                return;
 
-       print("emergency: got no good nearby WP to build a link from, starting a new chain\n");
+       LOG_INFO("emergency: got no good nearby WP to build a link from, starting a new chain\n");
        if(!botframe_autowaypoints_fixdown(p.origin))
                return; // shouldn't happen, caught above
        botframe_autowaypoints_createwp(trace_endpos, p, fld, WAYPOINTFLAG_PROTECTED);
@@ -1140,7 +1140,7 @@ void botframe_deleteuselesswaypoints()
        {
                if (!(w.wpflags & (WAYPOINTFLAG_USEFUL | WAYPOINTFLAG_DEAD_END)))
                {
-                       printf("Removed a waypoint at %v. Try again for more!\n", w.origin);
+                       LOG_INFOF("Removed a waypoint at %v. Try again for more!\n", w.origin);
                        te_explosion(w.origin);
                        waypoint_remove(w);
                        break;
index 650855989edebccc0ee31cf1aba8984b6a634b2f..825b9bfc179d71a4787f6f2a89fb22756c28b8be 100644 (file)
@@ -22,7 +22,7 @@ float CampaignBailout(string s)
        cvar_string = cvar_string_normal;
        cvar_set = cvar_set_normal;
        cvar_set("g_campaign", "0");
-       print("^4campaign initialization failed: ", s, "\n");
+       LOG_INFO("^4campaign initialization failed: ", s, "\n");
        if(autocvar__campaign_testrun)
                error("CAMPAIGN FAIL AHAHAHAHAHAHAHAHAH))");
        return 1;
@@ -265,7 +265,7 @@ void CampaignPostIntermission()
        if(campaign_won && campaign_entries < 2)
        {
                // last map won!
-               print("^2test run: campaign looks GOOD\n");
+               LOG_INFO("^2test run: campaign looks GOOD\n");
                localcmd("togglemenu 1\n");
                CampaignFile_Unload();
                return;
index 502340fd99e398f35946b9e8adc0194224065efa..b193c4d6cc94a0b34ab1cb06ad5b6a8df6404f00 100644 (file)
@@ -290,7 +290,7 @@ float CheatImpulse(float i)
                        RadiusDamage(e2, self, 1000, 0, 128, world, world, 500, DEATH_CHEAT, e);
                        remove(e2);
 
-                       print("404 Sportsmanship not found.\n");
+                       LOG_INFO("404 Sportsmanship not found.\n");
                        DID_CHEAT();
                        break;
        }
index 40775abee330a29a25ae781017f49e27aaec92dc..46da0d65d57292d52751d62675d063006e2ed461 100644 (file)
@@ -1072,7 +1072,7 @@ void ClientConnect (void)
 
        if(IS_CLIENT(self))
        {
-               print("Warning: ClientConnect, but already connected!\n");
+               LOG_INFO("Warning: ClientConnect, but already connected!\n");
                return;
        }
 
@@ -1092,7 +1092,7 @@ void ClientConnect (void)
 
        if(player_count<0)
        {
-               dprint("BUG player count is lower than zero, this cannot happen!\n");
+               LOG_TRACE("BUG player count is lower than zero, this cannot happen!\n");
                player_count = 0;
        }
 
@@ -1294,7 +1294,7 @@ void ClientDisconnect (void)
 
        if (!IS_CLIENT(self))
        {
-               print("Warning: ClientDisconnect without ClientConnect\n");
+               LOG_INFO("Warning: ClientDisconnect without ClientConnect\n");
                return;
        }
 
@@ -2323,7 +2323,7 @@ void PlayerPreThink (void)
                                        if(strstr(autocvar_g_xonoticversion, "git", 0) >= 0 || strstr(autocvar_g_xonoticversion, "autobuild", 0) >= 0)
                                        {
                                                // notify release users if connecting to git
-                                               dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
+                                               LOG_TRACE("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
                                                Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_BETA, autocvar_g_xonoticversion, self.cvar_g_xonoticversion);
                                        }
                                        else
@@ -2333,13 +2333,13 @@ void PlayerPreThink (void)
                                                if(r < 0)
                                                {
                                                        // give users new version
-                                                       dprint("^1NOTE^7 to ", self.netname, "^7 - ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.org/^1!\n");
+                                                       LOG_TRACE("^1NOTE^7 to ", self.netname, "^7 - ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.org/^1!\n");
                                                        Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_OUTDATED, autocvar_g_xonoticversion, self.cvar_g_xonoticversion);
                                                }
                                                else if(r > 0)
                                                {
                                                        // notify users about old server version
-                                                       print("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
+                                                       LOG_INFO("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
                                                        Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_OLD, autocvar_g_xonoticversion, self.cvar_g_xonoticversion);
                                                }
                                        }
index 45174f2c6008e2c8f914088b8bd9b83090f4c0a5..dd010214e589a57cbbfc70033bf22e87f67e25bc 100644 (file)
@@ -311,7 +311,7 @@ void ImpulseCommands (void)
                                        {
                                                if(e.wpcost >= 10000000)
                                                {
-                                                       print("unreachable: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("unreachable: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.colormod_z = 8;
                                                        e.effects |= EF_NODEPTHTEST | EF_BLUE;
                                                        ++i;
@@ -319,14 +319,14 @@ void ImpulseCommands (void)
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " waypoints cannot be reached from here in any way (marked with blue light)\n");
+                                               LOG_INFO(ftos(i), " waypoints cannot be reached from here in any way (marked with blue light)\n");
                                        navigation_markroutes_inverted(e2);
                                        i = 0;
                                        for(e = findchain(classname, "waypoint"); e; e = e.chain)
                                        {
                                                if(e.wpcost >= 10000000)
                                                {
-                                                       print("cannot reach me: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("cannot reach me: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.colormod_x = 8;
                                                        if(!(e.effects & EF_NODEPTHTEST)) // not already reported before
                                                                ++m;
@@ -335,9 +335,9 @@ void ImpulseCommands (void)
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " waypoints cannot walk to here in any way (marked with red light)\n");
+                                               LOG_INFO(ftos(i), " waypoints cannot walk to here in any way (marked with red light)\n");
                                        if(m)
-                                               print(ftos(m), " waypoints have been marked total\n");
+                                               LOG_INFO(ftos(m), " waypoints have been marked total\n");
                                        i = 0;
                                        for(e = findchain(classname, "info_player_deathmatch"); e; e = e.chain)
                                        {
@@ -353,7 +353,7 @@ void ImpulseCommands (void)
                                                else
                                                {
                                                        setorigin(e, org);
-                                                       print("spawn without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("spawn without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.effects |= EF_NODEPTHTEST;
                                                        setmodel(e, self.model);
                                                        e.frame = self.frame;
@@ -364,7 +364,7 @@ void ImpulseCommands (void)
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " spawnpoints have no nearest waypoint (marked by player model)\n");
+                                               LOG_INFO(ftos(i), " spawnpoints have no nearest waypoint (marked by player model)\n");
                                        i = 0;
                                        entity start;
                                        start = findchainflags(flags, FL_ITEM);
@@ -380,14 +380,14 @@ void ImpulseCommands (void)
                                                }
                                                else
                                                {
-                                                       print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.effects |= EF_NODEPTHTEST | EF_RED;
                                                        e.colormod_x = 8;
                                                        ++i;
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " items have no nearest waypoint and cannot be walked away from (marked with red light)\n");
+                                               LOG_INFO(ftos(i), " items have no nearest waypoint and cannot be walked away from (marked with red light)\n");
                                        i = 0;
                                        for(e = start; e; e = e.chain)
                                        {
@@ -397,14 +397,14 @@ void ImpulseCommands (void)
                                                }
                                                else
                                                {
-                                                       print("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
+                                                       LOG_INFO("item without waypoint: ", etos(e), " ", vtos(e.origin), "\n");
                                                        e.effects |= EF_NODEPTHTEST | EF_BLUE;
                                                        e.colormod_z = 8;
                                                        ++i;
                                                }
                                        }
                                        if(i)
-                                               print(ftos(i), " items have no nearest waypoint and cannot be walked to (marked with blue light)\n");
+                                               LOG_INFO(ftos(i), " items have no nearest waypoint and cannot be walked to (marked with blue light)\n");
                                        break;
                        }
                }
index 9ba3b27cb0bafb4fca55e7264cddec5bf0353462..f0ecfb3e8673955fcbaf74397aa0b324fc011c19 100644 (file)
@@ -828,7 +828,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f
        }
 
        if(flood)
-               print("NOTE: ", playername(source), "^7 is flooding.\n");
+               LOG_INFO("NOTE: ", playername(source), "^7 is flooding.\n");
 
        // build sourcemsgstr by cutting off a prefix and replacing it by the other one
        if(privatesay)
@@ -978,7 +978,7 @@ void PrecachePlayerSounds(string f)
        {
                if(tokenize_console(s) != 3)
                {
-                       dprint("Invalid sound info line: ", s, "\n");
+                       LOG_TRACE("Invalid sound info line: ", s, "\n");
                        continue;
                }
                PrecacheGlobalSound(strcat(argv(1), " ", argv(2)));
@@ -1010,7 +1010,7 @@ float LoadPlayerSounds(string f, float first)
        fh = fopen(f, FILE_READ);
        if(fh < 0)
        {
-               dprint("Player sound file not found: ", f, "\n");
+               LOG_TRACE("Player sound file not found: ", f, "\n");
                return 0;
        }
        while((s = fgets(fh)))
index e3d3c67591f9888de119f0a3bc1f344156ae689f..add929004c0cece3df6467b8f2ec64e931acbea8 100644 (file)
@@ -37,14 +37,14 @@ void BanCommand_ban(float request, float argc, string command)
                }
 
                default:
-                       print("Incorrect parameters for ^2ban^7\n");
+                       LOG_INFO("Incorrect parameters for ^2ban^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd ban address [bantime] [reason]\n");
-                       print("  'address' is the IP address or range of the player to ban,\n");
-                       print("  'bantime' is the amount of time that the ban is active (default if not provided),\n");
-                       print("  and 'reason' is the string to label the ban with as reason for banning.\n");
-                       print("See also: ^2banlist, kickban, unban^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd ban address [bantime] [reason]\n");
+                       LOG_INFO("  'address' is the IP address or range of the player to ban,\n");
+                       LOG_INFO("  'bantime' is the amount of time that the ban is active (default if not provided),\n");
+                       LOG_INFO("  and 'reason' is the string to label the ban with as reason for banning.\n");
+                       LOG_INFO("See also: ^2banlist, kickban, unban^7\n");
                        return;
                }
        }
@@ -63,9 +63,9 @@ void BanCommand_banlist(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd banlist\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2ban, kickban, unban^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd banlist\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2ban, kickban, unban^7\n");
                        return;
                }
        }
@@ -98,21 +98,21 @@ void BanCommand_kickban(float request, float argc, string command)
                                }
                                else
                                {
-                                       print("kickban: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                                       LOG_INFO("kickban: ", GetClientErrorString(accepted, argv(1)), ".\n");
                                }
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2kickban^7\n");
+                       LOG_INFO("Incorrect parameters for ^2kickban^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd kickban client [bantime] [masksize] [reason]\n");
-                       print("  'client' is the entity number or name of the player to ban,\n");
-                       print("  'bantime' is the amount of time that the ban is active (default if not provided),\n");
-                       print("  'masksize' is the range of the IP address (1-thru-4, default if not provided),\n");
-                       print("  and 'reason' is the string to label the ban with as reason for banning.\n");
-                       print("See also: ^2ban, banlist, unban^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd kickban client [bantime] [masksize] [reason]\n");
+                       LOG_INFO("  'client' is the entity number or name of the player to ban,\n");
+                       LOG_INFO("  'bantime' is the amount of time that the ban is active (default if not provided),\n");
+                       LOG_INFO("  'masksize' is the range of the IP address (1-thru-4, default if not provided),\n");
+                       LOG_INFO("  and 'reason' is the string to label the ban with as reason for banning.\n");
+                       LOG_INFO("See also: ^2ban, banlist, unban^7\n");
                        return;
                }
        }
@@ -136,18 +136,18 @@ void BanCommand_mute(float request, float argc, string command) // TODO: Add a s
                                }
                                else
                                {
-                                       print("mute: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                                       LOG_INFO("mute: ", GetClientErrorString(accepted, argv(1)), ".\n");
                                }
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2mute^7\n");
+                       LOG_INFO("Incorrect parameters for ^2mute^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd mute client\n");
-                       print("  'client' is the entity number or name of the player to mute.\n");
-                       print("See also: ^2unmute^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd mute client\n");
+                       LOG_INFO("  'client' is the entity number or name of the player to mute.\n");
+                       LOG_INFO("See also: ^2unmute^7\n");
                        return;
                }
        }
@@ -198,9 +198,9 @@ void BanCommand_unban(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd unban banid\n");
-                       print("  Where 'banid' is the ID of the ban of which to remove.\n");
-                       print("See also: ^2ban, banlist, kickban^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd unban banid\n");
+                       LOG_INFO("  Where 'banid' is the ID of the ban of which to remove.\n");
+                       LOG_INFO("See also: ^2ban, banlist, kickban^7\n");
                        return;
                }
        }
@@ -224,18 +224,18 @@ void BanCommand_unmute(float request, float argc)
                                }
                                else
                                {
-                                       print("unmute: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                                       LOG_INFO("unmute: ", GetClientErrorString(accepted, argv(1)), ".\n");
                                }
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2mute^7\n");
+                       LOG_INFO("Incorrect parameters for ^2mute^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd unmute client\n");
-                       print("  'client' is the entity number or name of the player to unmute.\n");
-                       print("See also: ^2mute^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd unmute client\n");
+                       LOG_INFO("  'client' is the entity number or name of the player to unmute.\n");
+                       LOG_INFO("See also: ^2mute^7\n");
                        return;
                }
        }
@@ -282,7 +282,7 @@ void BanCommand_(float request)
 void BanCommand_macro_help()
 {
        #define BAN_COMMAND(name,function,description) \
-               { if(strtolower(description) != "") { print("  ^2", name, "^7: ", description, "\n"); } }
+               { if(strtolower(description) != "") { LOG_INFO("  ^2", name, "^7: ", description, "\n"); } }
 
        BAN_COMMANDS(0, 0, "");
        #undef BAN_COMMAND
index 24187b172f01a398cc8b7f6bfda135d63c62e234..b28e7b1a27a1f4012b1631cadfd973a8279e6755 100644 (file)
@@ -93,7 +93,7 @@ void ClientCommand_checkfail(float request, string command) // internal command,
        {
                case CMD_REQUEST_COMMAND:
                {
-                       printf("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
+                       LOG_INFOF("CHECKFAIL: %s (%s) epically failed check %s\n", self.netname, self.netaddress, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
                        self.checkfail = 1;
                        return; // never fall through to usage
                }
index b303f4b33c2c5dae668d9ffd59ef496c23d4e6da..050aa5fac11b0d7a50c645ed6259415fc167a822 100644 (file)
@@ -169,7 +169,7 @@ void print_to(entity to, string input)
     if(to)
         sprint(to, strcat(input, "\n"));
     else
-        print(input, "\n");
+        LOG_INFO(input, "\n");
 }
 
 // ==========================================
@@ -518,7 +518,7 @@ void CommonCommand_timein(float request, entity caller)
                                                        return;
                                                }
 
-                                               default: dprint("timeout status was inactive, but this code was executed anyway?"); return;
+                                               default: LOG_TRACE("timeout status was inactive, but this code was executed anyway?"); return;
                                        }
                                }
                        }
index 53cab574729d7f524639222433f4fb6c1f4c3529..396337a1871572ba9a9797652389943010aed35b 100644 (file)
@@ -45,7 +45,7 @@ float FullTraceFraction(vector a, vector mi, vector ma, vector b)
        }
 
        if(n > 200)
-               dprint("HOLY SHIT! FullTraceFraction: ", ftos(n), " total traces, ", ftos(m), " iterations\n");
+               LOG_TRACE("HOLY SHIT! FullTraceFraction: ", ftos(n), " total traces, ", ftos(m), " iterations\n");
 
        return white / (black + white);
 }
@@ -245,7 +245,7 @@ void RadarMap_Think()
                self.maxs_x = (mi_picmax.x - mi_picmin.x) / self.size.x;
                self.maxs_y = (mi_picmax.y - mi_picmin.y) / self.size.y;
                self.maxs_z = mi_max.z - mi_min.z;
-               print("Picture mins/maxs: ", ftos(self.maxs.x), " and ", ftos(self.maxs.y), " should match\n");
+               LOG_INFO("Picture mins/maxs: ", ftos(self.maxs.x), " and ", ftos(self.maxs.y), " should match\n");
                self.netname = strzone(strcat("gfx/", mi_shortname, "_radar.xpm"));
                if(!(self.count & 1))
                {
@@ -266,7 +266,7 @@ void RadarMap_Think()
                        {
                                fclose(self.cnt);
 
-                               print(self.netname, " already exists, aborting (you may want to specify --force)\n");
+                               LOG_INFO(self.netname, " already exists, aborting (you may want to specify --force)\n");
                                RadarMap_Next();
                                return;
                        }
@@ -274,12 +274,12 @@ void RadarMap_Think()
                self.cnt = fopen(self.netname, FILE_WRITE);
                if(self.cnt < 0)
                {
-                       print("Error writing ", self.netname, "\n");
+                       LOG_INFO("Error writing ", self.netname, "\n");
                        remove(self);
                        radarmapper = world;
                        return;
                }
-               print("Writing to ", self.netname, "...\n");
+               LOG_INFO("Writing to ", self.netname, "...\n");
                fputs(self.cnt, "/* XPM */\n");
                fputs(self.cnt, "static char *RadarMap[] = {\n");
                fputs(self.cnt, "/* columns rows colors chars-per-pixel */\n");
@@ -347,7 +347,7 @@ void RadarMap_Think()
                        else
                        {
                                fputs(self.cnt, "\",\n");
-                               print(ftos(self.size.y - self.frame), " lines left\n");
+                               LOG_INFO(ftos(self.size.y - self.frame), " lines left\n");
                        }
                }
 
@@ -367,7 +367,7 @@ void RadarMap_Think()
                        else
                        {
                                fputs(self.cnt, "\",\n");
-                               print(ftos(self.size.y - self.frame), " lines left\n");
+                               LOG_INFO(ftos(self.size.y - self.frame), " lines left\n");
                        }
                }
 
@@ -379,7 +379,7 @@ void RadarMap_Think()
                // close the file
                fputs(self.cnt, "};\n");
                fclose(self.cnt);
-               print("Finished. Please edit data/", self.netname, " with an image editing application and place it in the TGA format in the gfx folder.\n");
+               LOG_INFO("Finished. Please edit data/", self.netname, " with an image editing application and place it in the TGA format in the gfx folder.\n");
                RadarMap_Next();
        }
 }
@@ -425,7 +425,7 @@ float RadarMap_Make(float argc)
 
                if(radarmapper) // after doing the arguments, see if we successfully went forward.
                {
-                       print("Radarmap entity spawned.\n");
+                       LOG_INFO("Radarmap entity spawned.\n");
                        return true; // if so, don't print usage.
                }
        }
index 29e75b63b2a0121c1a62e336acc3ebda2ae2e6c3..0855d41c921c34dbd38ec7ef9f65bc7a87d76396 100644 (file)
@@ -44,7 +44,7 @@ void make_mapinfo_Think()
 {
        if(MapInfo_FilterGametype(MAPINFO_TYPE_ALL, 0, 0, 0, 1))
        {
-               print("Done rebuiling mapinfos.\n");
+               LOG_INFO("Done rebuiling mapinfos.\n");
                MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
                remove(self);
        }
@@ -131,7 +131,7 @@ void GameCommand_adminmsg(float request, float argc)
 
                                        if(accepted <= 0)
                                        {
-                                               print("adminmsg: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
+                                               LOG_INFO("adminmsg: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
                                                continue;
                                        }
 
@@ -147,29 +147,29 @@ void GameCommand_adminmsg(float request, float argc)
                                        }
 
                                        successful = strcat(successful, (successful ? ", " : ""), client.netname);
-                                       dprint("Message sent to ", client.netname, "\n");
+                                       LOG_TRACE("Message sent to ", client.netname, "\n");
                                        continue;
                                }
 
                                if(successful)
                                        bprint("Successfully sent message '", admin_message, "' to ", successful, ".\n");
                                else
-                                       print("No players given (", original_targets, ") could receive the message.\n");
+                                       LOG_INFO("No players given (", original_targets, ") could receive the message.\n");
 
                                return;
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2adminmsg^7\n");
+                       LOG_INFO("Incorrect parameters for ^2adminmsg^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd adminmsg clients \"message\" [infobartime]\n");
-                       print("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
-                       print("  If infobartime is provided, the message will be sent to infobar.\n");
-                       print("  Otherwise, it will just be sent as a centerprint message.\n");
-                       print("Examples: adminmsg 2,4 \"this infomessage will last for ten seconds\" 10\n");
-                       print("          adminmsg 2,5 \"this message will be a centerprint\"\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd adminmsg clients \"message\" [infobartime]\n");
+                       LOG_INFO("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
+                       LOG_INFO("  If infobartime is provided, the message will be sent to infobar.\n");
+                       LOG_INFO("  Otherwise, it will just be sent as a centerprint message.\n");
+                       LOG_INFO("Examples: adminmsg 2,4 \"this infomessage will last for ten seconds\" 10\n");
+                       LOG_INFO("          adminmsg 2,5 \"this message will be a centerprint\"\n");
                        return;
                }
        }
@@ -181,8 +181,8 @@ void GameCommand_mobbutcher(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       if(autocvar_g_campaign) { print("This command doesn't work in campaign mode.\n"); return; }
-                       if(g_invasion) { print("This command doesn't work during an invasion.\n"); return; }
+                       if(autocvar_g_campaign) { LOG_INFO("This command doesn't work in campaign mode.\n"); return; }
+                       if(g_invasion) { LOG_INFO("This command doesn't work during an invasion.\n"); return; }
 
                        float removed_count = 0;
                        entity head;
@@ -199,9 +199,9 @@ void GameCommand_mobbutcher(float request)
                        totalspawned = 0;
 
                        if(removed_count <= 0)
-                               print("No monsters to kill\n");
+                               LOG_INFO("No monsters to kill\n");
                        else
-                               printf("Killed %d monster%s\n", removed_count, ((removed_count == 1) ? "" : "s"));
+                               LOG_INFOF("Killed %d monster%s\n", removed_count, ((removed_count == 1) ? "" : "s"));
 
                        return; // never fall through to usage
                }
@@ -209,8 +209,8 @@ void GameCommand_mobbutcher(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd mobbutcher\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd mobbutcher\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -229,8 +229,8 @@ void GameCommand_allready(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd allready\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd allready\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -255,16 +255,16 @@ void GameCommand_allspec(float request, float argc)
                                ++i;
                        }
                        if(i) { bprint(strcat("Successfully forced all (", ftos(i), ") players to spectate", (reason ? strcat(" for reason: '", reason, "'") : ""), ".\n")); }
-                       else { print("No players found to spectate.\n"); }
+                       else { LOG_INFO("No players found to spectate.\n"); }
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd allspec [reason]\n");
-                       print("  Where 'reason' is an optional argument for explanation of allspec command.\n");
-                       print("See also: ^2moveplayer, shuffleteams^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd allspec [reason]\n");
+                       LOG_INFO("  Where 'reason' is an optional argument for explanation of allspec command.\n");
+                       LOG_INFO("See also: ^2moveplayer, shuffleteams^7\n");
                        return;
                }
        }
@@ -287,16 +287,16 @@ void GameCommand_anticheat(float request, float argc)
                        }
                        else
                        {
-                               print("anticheat: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                               LOG_INFO("anticheat: ", GetClientErrorString(accepted, argv(1)), ".\n");
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2anticheat^7\n");
+                       LOG_INFO("Incorrect parameters for ^2anticheat^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd anticheat client\n");
-                       print("  'client' is the entity number or name of the player.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd anticheat client\n");
+                       LOG_INFO("  'client' is the entity number or name of the player.\n");
                        return;
                }
        }
@@ -308,11 +308,11 @@ void GameCommand_bbox(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       print("Original size: ", ftos(world.absmin.x), " ", ftos(world.absmin.y), " ", ftos(world.absmin.z));
-                       print(" ", ftos(world.absmax.x), " ", ftos(world.absmax.y), " ", ftos(world.absmax.z), "\n");
-                       print("Currently set size: ", ftos(world.mins.x), " ", ftos(world.mins.y), " ", ftos(world.mins.z));
-                       print(" ", ftos(world.maxs.x), " ", ftos(world.maxs.y), " ", ftos(world.maxs.z), "\n");
-                       print("Solid bounding box size:");
+                       LOG_INFO("Original size: ", ftos(world.absmin.x), " ", ftos(world.absmin.y), " ", ftos(world.absmin.z));
+                       LOG_INFO(" ", ftos(world.absmax.x), " ", ftos(world.absmax.y), " ", ftos(world.absmax.z), "\n");
+                       LOG_INFO("Currently set size: ", ftos(world.mins.x), " ", ftos(world.mins.y), " ", ftos(world.mins.z));
+                       LOG_INFO(" ", ftos(world.maxs.x), " ", ftos(world.maxs.y), " ", ftos(world.maxs.z), "\n");
+                       LOG_INFO("Solid bounding box size:");
 
                        tracebox('1 0 0' * world.absmin.x,
                                                        '0 1 0' * world.absmin.y + '0 0 1' * world.absmin.z,
@@ -321,9 +321,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmin.x));
+                               LOG_INFO(" ", ftos(world.absmin.x));
                        else
-                               print(" ", ftos(trace_endpos.x));
+                               LOG_INFO(" ", ftos(trace_endpos.x));
 
                        tracebox('0 1 0' * world.absmin.y,
                                                        '1 0 0' * world.absmin.x + '0 0 1' * world.absmin.z,
@@ -332,9 +332,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmin.y));
+                               LOG_INFO(" ", ftos(world.absmin.y));
                        else
-                               print(" ", ftos(trace_endpos.y));
+                               LOG_INFO(" ", ftos(trace_endpos.y));
 
                        tracebox('0 0 1' * world.absmin.z,
                                                        '1 0 0' * world.absmin.x + '0 1 0' * world.absmin.y,
@@ -343,9 +343,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmin.z));
+                               LOG_INFO(" ", ftos(world.absmin.z));
                        else
-                               print(" ", ftos(trace_endpos.z));
+                               LOG_INFO(" ", ftos(trace_endpos.z));
 
                        tracebox('1 0 0' * world.absmax.x,
                                                        '0 1 0' * world.absmin.y + '0 0 1' * world.absmin.z,
@@ -354,9 +354,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmax.x));
+                               LOG_INFO(" ", ftos(world.absmax.x));
                        else
-                               print(" ", ftos(trace_endpos.x));
+                               LOG_INFO(" ", ftos(trace_endpos.x));
 
                        tracebox('0 1 0' * world.absmax.y,
                                                        '1 0 0' * world.absmin.x + '0 0 1' * world.absmin.z,
@@ -365,9 +365,9 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmax.y));
+                               LOG_INFO(" ", ftos(world.absmax.y));
                        else
-                               print(" ", ftos(trace_endpos.y));
+                               LOG_INFO(" ", ftos(trace_endpos.y));
 
                        tracebox('0 0 1' * world.absmax.z,
                                                        '1 0 0' * world.absmin.x + '0 1 0' * world.absmin.y,
@@ -376,20 +376,20 @@ void GameCommand_bbox(float request)
                                        MOVE_WORLDONLY,
                                        world);
                        if(trace_startsolid)
-                               print(" ", ftos(world.absmax.z));
+                               LOG_INFO(" ", ftos(world.absmax.z));
                        else
-                               print(" ", ftos(trace_endpos.z));
+                               LOG_INFO(" ", ftos(trace_endpos.z));
 
-                       print("\n");
+                       LOG_INFO("\n");
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd bbox\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2gettaginfo, trace^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd bbox\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2gettaginfo, trace^7\n");
                        return;
                }
        }
@@ -416,7 +416,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                                bot_fixcount();
                                cvar_settemp("bot_number", argv(2));
                                if(!bot_fixcount())
-                                       print("Sorry, could not set requested bot count\n");
+                                       LOG_INFO("Sorry, could not set requested bot count\n");
                                return;
                        }
                        else if(argv(1) == "load" && argc == 3)
@@ -426,7 +426,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                                fh = fopen(argv(2), FILE_READ);
                                if(fh < 0)
                                {
-                                       print("cannot open the file\n");
+                                       LOG_INFO("cannot open the file\n");
                                        return;
                                }
 
@@ -449,7 +449,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                                                        bot_fixcount();
                                                        cvar_settemp("bot_number", argv(3));
                                                        if(!bot_fixcount())
-                                                               print("Sorry, could not set requested bot count\n");
+                                                               LOG_INFO("Sorry, could not set requested bot count\n");
                                                }
                                                else
                                                {
@@ -466,7 +466,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
 
                                        ++i;
                                }
-                               print(ftos(i), " commands read\n");
+                               LOG_INFO(ftos(i), " commands read\n");
                                fclose(fh);
                                return;
                        }
@@ -485,24 +485,24 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                                        bot = find_bot_by_name(argv(1));
                                if(bot)
                                {
-                                       print(strcat("Command '", substring(command, argv_start_index(2), -1), "' sent to bot ", bot.netname, "\n"));
+                                       LOG_INFO(strcat("Command '", substring(command, argv_start_index(2), -1), "' sent to bot ", bot.netname, "\n"));
                                        bot_queuecommand(bot, substring(command, argv_start_index(2), -1));
                                        return;
                                }
                                else
-                                       print(strcat("Error: Can't find bot with the name or id '", argv(1),"' - Did you mistype the command?\n")); // don't return so that usage is shown
+                                       LOG_INFO(strcat("Error: Can't find bot with the name or id '", argv(1),"' - Did you mistype the command?\n")); // don't return so that usage is shown
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2bot_cmd^7\n");
+                       LOG_INFO("Incorrect parameters for ^2bot_cmd^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd bot_cmd client command [argument]\n");
-                       print("  'client' can be either the name or entity id of the bot\n");
-                       print("  For full list of commands, see bot_cmd help [command].\n");
-                       print("Examples: sv_cmd bot_cmd client cc \"say something\"\n");
-                       print("          sv_cmd bot_cmd client presskey jump\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd bot_cmd client command [argument]\n");
+                       LOG_INFO("  'client' can be either the name or entity id of the bot\n");
+                       LOG_INFO("  For full list of commands, see bot_cmd help [command].\n");
+                       LOG_INFO("Examples: sv_cmd bot_cmd client cc \"say something\"\n");
+                       LOG_INFO("          sv_cmd bot_cmd client presskey jump\n");
                        return;
                }
        }
@@ -525,8 +525,8 @@ void GameCommand_cointoss(float request, float argc)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd cointoss [result1 result2]\n");
-                       print("  Where 'result1' and 'result2' are user created options.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd cointoss [result1 result2]\n");
+                       LOG_INFO("  Where 'result1' and 'result2' are user created options.\n");
                        return;
                }
        }
@@ -543,33 +543,33 @@ void GameCommand_database(float request, float argc)
                                if(argv(1) == "save")
                                {
                                        db_save(ServerProgsDB, argv(2));
-                                       print(strcat("Copied serverprogs database to '", argv(2), "' in the data directory.\n"));
+                                       LOG_INFO(strcat("Copied serverprogs database to '", argv(2), "' in the data directory.\n"));
                                        return;
                                }
                                else if(argv(1) == "dump")
                                {
                                        db_dump(ServerProgsDB, argv(2));
-                                       print("DB dumped.\n"); // wtf does this do?
+                                       LOG_INFO("DB dumped.\n"); // wtf does this do?
                                        return;
                                }
                                else if(argv(1) == "load")
                                {
                                        db_close(ServerProgsDB);
                                        ServerProgsDB = db_load(argv(2));
-                                       print(strcat("Loaded '", argv(2), "' as new serverprogs database.\n"));
+                                       LOG_INFO(strcat("Loaded '", argv(2), "' as new serverprogs database.\n"));
                                        return;
                                }
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2database^7\n");
+                       LOG_INFO("Incorrect parameters for ^2database^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd database action filename\n");
-                       print("  Where 'action' is the command to complete,\n");
-                       print("  and 'filename' is what it acts upon.\n");
-                       print("  Full list of commands here: \"save, dump, load.\"\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd database action filename\n");
+                       LOG_INFO("  Where 'action' is the command to complete,\n");
+                       LOG_INFO("  and 'filename' is what it acts upon.\n");
+                       LOG_INFO("  Full list of commands here: \"save, dump, load.\"\n");
                        return;
                }
        }
@@ -592,21 +592,21 @@ void GameCommand_defer_clear(float request, float argc)
                                if(accepted > 0)
                                {
                                        stuffcmd(client, "defer clear\n");
-                                       print("defer clear stuffed to ", client.netname, "\n");
+                                       LOG_INFO("defer clear stuffed to ", client.netname, "\n");
                                }
-                               else { print("defer_clear: ", GetClientErrorString(accepted, argv(1)), ".\n"); }
+                               else { LOG_INFO("defer_clear: ", GetClientErrorString(accepted, argv(1)), ".\n"); }
 
                                return;
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2defer_clear^7\n");
+                       LOG_INFO("Incorrect parameters for ^2defer_clear^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd defer_clear client\n");
-                       print("  'client' is the entity number or name of the player.\n");
-                       print("See also: ^2defer_clear_all^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd defer_clear client\n");
+                       LOG_INFO("  'client' is the entity number or name of the player.\n");
+                       LOG_INFO("See also: ^2defer_clear_all^7\n");
                        return;
                }
        }
@@ -628,16 +628,16 @@ void GameCommand_defer_clear_all(float request)
                                GameCommand_defer_clear(CMD_REQUEST_COMMAND, argc);
                                ++i;
                        }
-                       if(i) { print(strcat("Successfully stuffed defer clear to all clients (", ftos(i), ")\n")); } // should a message be added if no players were found?
+                       if(i) { LOG_INFO(strcat("Successfully stuffed defer clear to all clients (", ftos(i), ")\n")); } // should a message be added if no players were found?
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd defer_clear_all\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2defer_clear^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd defer_clear_all\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2defer_clear^7\n");
                        return;
                }
        }
@@ -660,13 +660,13 @@ void GameCommand_delrec(float request, float argc)  // perhaps merge later with
                }
 
                default:
-                       print("Incorrect parameters for ^2delrec^7\n");
+                       LOG_INFO("Incorrect parameters for ^2delrec^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd delrec ranking [map]\n");
-                       print("  'ranking' is which ranking level to clear up to, \n");
-                       print("  it will clear all records up to nth place.\n");
-                       print("  if 'map' is not provided it will use current map.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd delrec ranking [map]\n");
+                       LOG_INFO("  'ranking' is which ranking level to clear up to, \n");
+                       LOG_INFO("  it will clear all records up to nth place.\n");
+                       LOG_INFO("  if 'map' is not provided it will use current map.\n");
                        return;
                }
        }
@@ -682,43 +682,43 @@ void GameCommand_effectindexdump(float request)
                        string s;
 
                        d = db_create();
-                       print("begin of effects list\n");
-                       db_put(d, "TE_GUNSHOT", "1"); print("effect TE_GUNSHOT is ", ftos(particleeffectnum("TE_GUNSHOT")), "\n");
-                       db_put(d, "TE_GUNSHOTQUAD", "1"); print("effect TE_GUNSHOTQUAD is ", ftos(particleeffectnum("TE_GUNSHOTQUAD")), "\n");
-                       db_put(d, "TE_SPIKE", "1"); print("effect TE_SPIKE is ", ftos(particleeffectnum("TE_SPIKE")), "\n");
-                       db_put(d, "TE_SPIKEQUAD", "1"); print("effect TE_SPIKEQUAD is ", ftos(particleeffectnum("TE_SPIKEQUAD")), "\n");
-                       db_put(d, "TE_SUPERSPIKE", "1"); print("effect TE_SUPERSPIKE is ", ftos(particleeffectnum("TE_SUPERSPIKE")), "\n");
-                       db_put(d, "TE_SUPERSPIKEQUAD", "1"); print("effect TE_SUPERSPIKEQUAD is ", ftos(particleeffectnum("TE_SUPERSPIKEQUAD")), "\n");
-                       db_put(d, "TE_WIZSPIKE", "1"); print("effect TE_WIZSPIKE is ", ftos(particleeffectnum("TE_WIZSPIKE")), "\n");
-                       db_put(d, "TE_KNIGHTSPIKE", "1"); print("effect TE_KNIGHTSPIKE is ", ftos(particleeffectnum("TE_KNIGHTSPIKE")), "\n");
-                       db_put(d, "TE_EXPLOSION", "1"); print("effect TE_EXPLOSION is ", ftos(particleeffectnum("TE_EXPLOSION")), "\n");
-                       db_put(d, "TE_EXPLOSIONQUAD", "1"); print("effect TE_EXPLOSIONQUAD is ", ftos(particleeffectnum("TE_EXPLOSIONQUAD")), "\n");
-                       db_put(d, "TE_TAREXPLOSION", "1"); print("effect TE_TAREXPLOSION is ", ftos(particleeffectnum("TE_TAREXPLOSION")), "\n");
-                       db_put(d, "TE_TELEPORT", "1"); print("effect TE_TELEPORT is ", ftos(particleeffectnum("TE_TELEPORT")), "\n");
-                       db_put(d, "TE_LAVASPLASH", "1"); print("effect TE_LAVASPLASH is ", ftos(particleeffectnum("TE_LAVASPLASH")), "\n");
-                       db_put(d, "TE_SMALLFLASH", "1"); print("effect TE_SMALLFLASH is ", ftos(particleeffectnum("TE_SMALLFLASH")), "\n");
-                       db_put(d, "TE_FLAMEJET", "1"); print("effect TE_FLAMEJET is ", ftos(particleeffectnum("TE_FLAMEJET")), "\n");
-                       db_put(d, "EF_FLAME", "1"); print("effect EF_FLAME is ", ftos(particleeffectnum("EF_FLAME")), "\n");
-                       db_put(d, "TE_BLOOD", "1"); print("effect TE_BLOOD is ", ftos(particleeffectnum("TE_BLOOD")), "\n");
-                       db_put(d, "TE_SPARK", "1"); print("effect TE_SPARK is ", ftos(particleeffectnum("TE_SPARK")), "\n");
-                       db_put(d, "TE_PLASMABURN", "1"); print("effect TE_PLASMABURN is ", ftos(particleeffectnum("TE_PLASMABURN")), "\n");
-                       db_put(d, "TE_TEI_G3", "1"); print("effect TE_TEI_G3 is ", ftos(particleeffectnum("TE_TEI_G3")), "\n");
-                       db_put(d, "TE_TEI_SMOKE", "1"); print("effect TE_TEI_SMOKE is ", ftos(particleeffectnum("TE_TEI_SMOKE")), "\n");
-                       db_put(d, "TE_TEI_BIGEXPLOSION", "1"); print("effect TE_TEI_BIGEXPLOSION is ", ftos(particleeffectnum("TE_TEI_BIGEXPLOSION")), "\n");
-                       db_put(d, "TE_TEI_PLASMAHIT", "1"); print("effect TE_TEI_PLASMAHIT is ", ftos(particleeffectnum("TE_TEI_PLASMAHIT")), "\n");
-                       db_put(d, "EF_STARDUST", "1"); print("effect EF_STARDUST is ", ftos(particleeffectnum("EF_STARDUST")), "\n");
-                       db_put(d, "TR_ROCKET", "1"); print("effect TR_ROCKET is ", ftos(particleeffectnum("TR_ROCKET")), "\n");
-                       db_put(d, "TR_GRENADE", "1"); print("effect TR_GRENADE is ", ftos(particleeffectnum("TR_GRENADE")), "\n");
-                       db_put(d, "TR_BLOOD", "1"); print("effect TR_BLOOD is ", ftos(particleeffectnum("TR_BLOOD")), "\n");
-                       db_put(d, "TR_WIZSPIKE", "1"); print("effect TR_WIZSPIKE is ", ftos(particleeffectnum("TR_WIZSPIKE")), "\n");
-                       db_put(d, "TR_SLIGHTBLOOD", "1"); print("effect TR_SLIGHTBLOOD is ", ftos(particleeffectnum("TR_SLIGHTBLOOD")), "\n");
-                       db_put(d, "TR_KNIGHTSPIKE", "1"); print("effect TR_KNIGHTSPIKE is ", ftos(particleeffectnum("TR_KNIGHTSPIKE")), "\n");
-                       db_put(d, "TR_VORESPIKE", "1"); print("effect TR_VORESPIKE is ", ftos(particleeffectnum("TR_VORESPIKE")), "\n");
-                       db_put(d, "TR_NEHAHRASMOKE", "1"); print("effect TR_NEHAHRASMOKE is ", ftos(particleeffectnum("TR_NEHAHRASMOKE")), "\n");
-                       db_put(d, "TR_NEXUIZPLASMA", "1"); print("effect TR_NEXUIZPLASMA is ", ftos(particleeffectnum("TR_NEXUIZPLASMA")), "\n");
-                       db_put(d, "TR_GLOWTRAIL", "1"); print("effect TR_GLOWTRAIL is ", ftos(particleeffectnum("TR_GLOWTRAIL")), "\n");
-                       db_put(d, "TR_SEEKER", "1"); print("effect TR_SEEKER is ", ftos(particleeffectnum("TR_SEEKER")), "\n");
-                       db_put(d, "SVC_PARTICLE", "1"); print("effect SVC_PARTICLE is ", ftos(particleeffectnum("SVC_PARTICLE")), "\n");
+                       LOG_INFO("begin of effects list\n");
+                       db_put(d, "TE_GUNSHOT", "1"); LOG_INFO("effect TE_GUNSHOT is ", ftos(particleeffectnum("TE_GUNSHOT")), "\n");
+                       db_put(d, "TE_GUNSHOTQUAD", "1"); LOG_INFO("effect TE_GUNSHOTQUAD is ", ftos(particleeffectnum("TE_GUNSHOTQUAD")), "\n");
+                       db_put(d, "TE_SPIKE", "1"); LOG_INFO("effect TE_SPIKE is ", ftos(particleeffectnum("TE_SPIKE")), "\n");
+                       db_put(d, "TE_SPIKEQUAD", "1"); LOG_INFO("effect TE_SPIKEQUAD is ", ftos(particleeffectnum("TE_SPIKEQUAD")), "\n");
+                       db_put(d, "TE_SUPERSPIKE", "1"); LOG_INFO("effect TE_SUPERSPIKE is ", ftos(particleeffectnum("TE_SUPERSPIKE")), "\n");
+                       db_put(d, "TE_SUPERSPIKEQUAD", "1"); LOG_INFO("effect TE_SUPERSPIKEQUAD is ", ftos(particleeffectnum("TE_SUPERSPIKEQUAD")), "\n");
+                       db_put(d, "TE_WIZSPIKE", "1"); LOG_INFO("effect TE_WIZSPIKE is ", ftos(particleeffectnum("TE_WIZSPIKE")), "\n");
+                       db_put(d, "TE_KNIGHTSPIKE", "1"); LOG_INFO("effect TE_KNIGHTSPIKE is ", ftos(particleeffectnum("TE_KNIGHTSPIKE")), "\n");
+                       db_put(d, "TE_EXPLOSION", "1"); LOG_INFO("effect TE_EXPLOSION is ", ftos(particleeffectnum("TE_EXPLOSION")), "\n");
+                       db_put(d, "TE_EXPLOSIONQUAD", "1"); LOG_INFO("effect TE_EXPLOSIONQUAD is ", ftos(particleeffectnum("TE_EXPLOSIONQUAD")), "\n");
+                       db_put(d, "TE_TAREXPLOSION", "1"); LOG_INFO("effect TE_TAREXPLOSION is ", ftos(particleeffectnum("TE_TAREXPLOSION")), "\n");
+                       db_put(d, "TE_TELEPORT", "1"); LOG_INFO("effect TE_TELEPORT is ", ftos(particleeffectnum("TE_TELEPORT")), "\n");
+                       db_put(d, "TE_LAVASPLASH", "1"); LOG_INFO("effect TE_LAVASPLASH is ", ftos(particleeffectnum("TE_LAVASPLASH")), "\n");
+                       db_put(d, "TE_SMALLFLASH", "1"); LOG_INFO("effect TE_SMALLFLASH is ", ftos(particleeffectnum("TE_SMALLFLASH")), "\n");
+                       db_put(d, "TE_FLAMEJET", "1"); LOG_INFO("effect TE_FLAMEJET is ", ftos(particleeffectnum("TE_FLAMEJET")), "\n");
+                       db_put(d, "EF_FLAME", "1"); LOG_INFO("effect EF_FLAME is ", ftos(particleeffectnum("EF_FLAME")), "\n");
+                       db_put(d, "TE_BLOOD", "1"); LOG_INFO("effect TE_BLOOD is ", ftos(particleeffectnum("TE_BLOOD")), "\n");
+                       db_put(d, "TE_SPARK", "1"); LOG_INFO("effect TE_SPARK is ", ftos(particleeffectnum("TE_SPARK")), "\n");
+                       db_put(d, "TE_PLASMABURN", "1"); LOG_INFO("effect TE_PLASMABURN is ", ftos(particleeffectnum("TE_PLASMABURN")), "\n");
+                       db_put(d, "TE_TEI_G3", "1"); LOG_INFO("effect TE_TEI_G3 is ", ftos(particleeffectnum("TE_TEI_G3")), "\n");
+                       db_put(d, "TE_TEI_SMOKE", "1"); LOG_INFO("effect TE_TEI_SMOKE is ", ftos(particleeffectnum("TE_TEI_SMOKE")), "\n");
+                       db_put(d, "TE_TEI_BIGEXPLOSION", "1"); LOG_INFO("effect TE_TEI_BIGEXPLOSION is ", ftos(particleeffectnum("TE_TEI_BIGEXPLOSION")), "\n");
+                       db_put(d, "TE_TEI_PLASMAHIT", "1"); LOG_INFO("effect TE_TEI_PLASMAHIT is ", ftos(particleeffectnum("TE_TEI_PLASMAHIT")), "\n");
+                       db_put(d, "EF_STARDUST", "1"); LOG_INFO("effect EF_STARDUST is ", ftos(particleeffectnum("EF_STARDUST")), "\n");
+                       db_put(d, "TR_ROCKET", "1"); LOG_INFO("effect TR_ROCKET is ", ftos(particleeffectnum("TR_ROCKET")), "\n");
+                       db_put(d, "TR_GRENADE", "1"); LOG_INFO("effect TR_GRENADE is ", ftos(particleeffectnum("TR_GRENADE")), "\n");
+                       db_put(d, "TR_BLOOD", "1"); LOG_INFO("effect TR_BLOOD is ", ftos(particleeffectnum("TR_BLOOD")), "\n");
+                       db_put(d, "TR_WIZSPIKE", "1"); LOG_INFO("effect TR_WIZSPIKE is ", ftos(particleeffectnum("TR_WIZSPIKE")), "\n");
+                       db_put(d, "TR_SLIGHTBLOOD", "1"); LOG_INFO("effect TR_SLIGHTBLOOD is ", ftos(particleeffectnum("TR_SLIGHTBLOOD")), "\n");
+                       db_put(d, "TR_KNIGHTSPIKE", "1"); LOG_INFO("effect TR_KNIGHTSPIKE is ", ftos(particleeffectnum("TR_KNIGHTSPIKE")), "\n");
+                       db_put(d, "TR_VORESPIKE", "1"); LOG_INFO("effect TR_VORESPIKE is ", ftos(particleeffectnum("TR_VORESPIKE")), "\n");
+                       db_put(d, "TR_NEHAHRASMOKE", "1"); LOG_INFO("effect TR_NEHAHRASMOKE is ", ftos(particleeffectnum("TR_NEHAHRASMOKE")), "\n");
+                       db_put(d, "TR_NEXUIZPLASMA", "1"); LOG_INFO("effect TR_NEXUIZPLASMA is ", ftos(particleeffectnum("TR_NEXUIZPLASMA")), "\n");
+                       db_put(d, "TR_GLOWTRAIL", "1"); LOG_INFO("effect TR_GLOWTRAIL is ", ftos(particleeffectnum("TR_GLOWTRAIL")), "\n");
+                       db_put(d, "TR_SEEKER", "1"); LOG_INFO("effect TR_SEEKER is ", ftos(particleeffectnum("TR_SEEKER")), "\n");
+                       db_put(d, "SVC_PARTICLE", "1"); LOG_INFO("effect SVC_PARTICLE is ", ftos(particleeffectnum("SVC_PARTICLE")), "\n");
 
                        fh = fopen("effectinfo.txt", FILE_READ);
                        while((s = fgets(fh)))
@@ -729,12 +729,12 @@ void GameCommand_effectindexdump(float request)
                                        if(db_get(d, argv(1)) != "1")
                                        {
                                                if(particleeffectnum(argv(1)) >= 0)
-                                                       print("effect ", argv(1), " is ", ftos(particleeffectnum(argv(1))), "\n");
+                                                       LOG_INFO("effect ", argv(1), " is ", ftos(particleeffectnum(argv(1))), "\n");
                                                db_put(d, argv(1), "1");
                                        }
                                }
                        }
-                       print("end of effects list\n");
+                       LOG_INFO("end of effects list\n");
 
                        db_close(d);
                        return;
@@ -743,8 +743,8 @@ void GameCommand_effectindexdump(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd effectindexdump\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd effectindexdump\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -763,9 +763,9 @@ void GameCommand_extendmatchtime(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd extendmatchtime\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2reducematchtime^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd extendmatchtime\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2reducematchtime^7\n");
                        return;
                }
        }
@@ -780,17 +780,17 @@ void GameCommand_find(float request, float argc)  // is this even needed? We hav
                        entity client;
 
                        for(client = world; (client = find(client, classname, argv(1))); )
-                               print(etos(client), "\n");
+                               LOG_INFO(etos(client), "\n");
 
                        return;
                }
 
                default:
-                       print("Incorrect parameters for ^2find^7\n");
+                       LOG_INFO("Incorrect parameters for ^2find^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd find classname\n");
-                       print("  Where 'classname' is the classname to search for.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd find classname\n");
+                       LOG_INFO("  Where 'classname' is the classname to search for.\n");
                        return;
                }
        }
@@ -833,12 +833,12 @@ void GameCommand_gametype(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2gametype^7\n");
+                       LOG_INFO("Incorrect parameters for ^2gametype^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd gametype mode\n");
-                       print("  Where 'mode' is the gametype mode to switch to.\n");
-                       print("See also: ^2gotomap^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd gametype mode\n");
+                       LOG_INFO("  Where 'mode' is the gametype mode to switch to.\n");
+                       LOG_INFO("See also: ^2gotomap^7\n");
                        return;
                }
        }
@@ -872,13 +872,13 @@ void GameCommand_gettaginfo(float request, float argc)
                                if(i)
                                {
                                        v = gettaginfo(tmp_entity, i);
-                                       print("model ", tmp_entity.model, " frame ", ftos(tmp_entity.frame), " tag ", gettaginfo_name);
-                                       print(" index ", ftos(i), " parent ", ftos(gettaginfo_parent), "\n");
-                                       print(" vector = ", ftos(v.x), " ", ftos(v.y), " ", ftos(v.z), "\n");
-                                       print(" offset = ", ftos(gettaginfo_offset.x), " ", ftos(gettaginfo_offset.y), " ", ftos(gettaginfo_offset.z), "\n");
-                                       print(" forward = ", ftos(gettaginfo_forward.x), " ", ftos(gettaginfo_forward.y), " ", ftos(gettaginfo_forward.z), "\n");
-                                       print(" right = ", ftos(gettaginfo_right.x), " ", ftos(gettaginfo_right.y), " ", ftos(gettaginfo_right.z), "\n");
-                                       print(" up = ", ftos(gettaginfo_up.x), " ", ftos(gettaginfo_up.y), " ", ftos(gettaginfo_up.z), "\n");
+                                       LOG_INFO("model ", tmp_entity.model, " frame ", ftos(tmp_entity.frame), " tag ", gettaginfo_name);
+                                       LOG_INFO(" index ", ftos(i), " parent ", ftos(gettaginfo_parent), "\n");
+                                       LOG_INFO(" vector = ", ftos(v.x), " ", ftos(v.y), " ", ftos(v.z), "\n");
+                                       LOG_INFO(" offset = ", ftos(gettaginfo_offset.x), " ", ftos(gettaginfo_offset.y), " ", ftos(gettaginfo_offset.z), "\n");
+                                       LOG_INFO(" forward = ", ftos(gettaginfo_forward.x), " ", ftos(gettaginfo_forward.y), " ", ftos(gettaginfo_forward.z), "\n");
+                                       LOG_INFO(" right = ", ftos(gettaginfo_right.x), " ", ftos(gettaginfo_right.y), " ", ftos(gettaginfo_right.z), "\n");
+                                       LOG_INFO(" up = ", ftos(gettaginfo_up.x), " ", ftos(gettaginfo_up.y), " ", ftos(gettaginfo_up.z), "\n");
                                        if(argc >= 6)
                                        {
                                                v.y = -v.y;
@@ -886,7 +886,7 @@ void GameCommand_gettaginfo(float request, float argc)
                                        }
                                }
                                else
-                                       print("bone not found\n");
+                                       LOG_INFO("bone not found\n");
 
                                remove(tmp_entity);
                                return;
@@ -894,11 +894,11 @@ void GameCommand_gettaginfo(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2gettaginfo^7\n");
+                       LOG_INFO("Incorrect parameters for ^2gettaginfo^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
-                       print("See also: ^2bbox, trace^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
+                       LOG_INFO("See also: ^2bbox, trace^7\n");
                        return;
                }
        }
@@ -941,8 +941,8 @@ void GameCommand_animbench(float request, float argc)
                                        t2 += gettime(GETTIME_HIRES) - t0;
                                        n += 1;
                                }
-                               print("model ", tmp_entity.model, " frame ", ftos(f1), " animtime ", ftos(n / t1), "/s\n");
-                               print("model ", tmp_entity.model, " frame ", ftos(f2), " animtime ", ftos(n / t2), "/s\n");
+                               LOG_INFO("model ", tmp_entity.model, " frame ", ftos(f1), " animtime ", ftos(n / t1), "/s\n");
+                               LOG_INFO("model ", tmp_entity.model, " frame ", ftos(f2), " animtime ", ftos(n / t2), "/s\n");
 
                                remove(tmp_entity);
                                return;
@@ -950,11 +950,11 @@ void GameCommand_animbench(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2gettaginfo^7\n");
+                       LOG_INFO("Incorrect parameters for ^2gettaginfo^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
-                       print("See also: ^2bbox, trace^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd gettaginfo model frame index [command one] [command two]\n");
+                       LOG_INFO("See also: ^2bbox, trace^7\n");
                        return;
                }
        }
@@ -968,18 +968,18 @@ void GameCommand_gotomap(float request, float argc)
                {
                        if(argv(1))
                        {
-                               print(GotoMap(argv(1)), "\n");
+                               LOG_INFO(GotoMap(argv(1)), "\n");
                                return;
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2gotomap^7\n");
+                       LOG_INFO("Incorrect parameters for ^2gotomap^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd gotomap map\n");
-                       print("  Where 'map' is the *.bsp file to change to.\n");
-                       print("See also: ^2gametype^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd gotomap map\n");
+                       LOG_INFO("  Where 'map' is the *.bsp file to change to.\n");
+                       LOG_INFO("See also: ^2gametype^7\n");
                        return;
                }
        }
@@ -1006,9 +1006,9 @@ void GameCommand_lockteams(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd lockteams\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2unlockteams^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd lockteams\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2unlockteams^7\n");
                        return;
                }
        }
@@ -1033,9 +1033,9 @@ void GameCommand_make_mapinfo(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd make_mapinfo\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2radarmap^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd make_mapinfo\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2radarmap^7\n");
                        return;
                }
        }
@@ -1070,7 +1070,7 @@ void GameCommand_moveplayer(float request, float argc)
 
                                        if(accepted <= 0)
                                        {
-                                               print("moveplayer: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
+                                               LOG_INFO("moveplayer: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
                                                continue;
                                        }
 
@@ -1088,7 +1088,7 @@ void GameCommand_moveplayer(float request, float argc)
                                                }
                                                else
                                                {
-                                                       print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already spectating.\n");
+                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already spectating.\n");
                                                }
                                                continue;
                                        }
@@ -1108,7 +1108,7 @@ void GameCommand_moveplayer(float request, float argc)
                                                                if(team_id == client.team) // already on the destination team
                                                                {
                                                                        // keep the forcing undone
-                                                                       print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7.\n"));
+                                                                       LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7.\n"));
                                                                        continue;
                                                                }
                                                                else if(team_id == 0)  // auto team
@@ -1125,30 +1125,30 @@ void GameCommand_moveplayer(float request, float argc)
                                                                // Check to see if the destination team is even available
                                                                switch(team_id)
                                                                {
-                                                                       case NUM_TEAM_1: if(c1 == -1) { print("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break;
-                                                                       case NUM_TEAM_2: if(c2 == -1) { print("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break;
-                                                                       case NUM_TEAM_3: if(c3 == -1) { print("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break;
-                                                                       case NUM_TEAM_4: if(c4 == -1) { print("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break;
+                                                                       case NUM_TEAM_1: if(c1 == -1) { LOG_INFO("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break;
+                                                                       case NUM_TEAM_2: if(c2 == -1) { LOG_INFO("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break;
+                                                                       case NUM_TEAM_3: if(c3 == -1) { LOG_INFO("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break;
+                                                                       case NUM_TEAM_4: if(c4 == -1) { LOG_INFO("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break;
 
-                                                                       default: print("Sorry, can't move player here if team ", destination, " doesn't exist.\n"); return;
+                                                                       default: LOG_INFO("Sorry, can't move player here if team ", destination, " doesn't exist.\n"); return;
                                                                }
 
                                                                // If so, lets continue and finally move the player
                                                                client.team_forced = 0;
                                                                MoveToTeam(client, team_id, 6);
                                                                successful = strcat(successful, (successful ? ", " : ""), client.netname);
-                                                               print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n");
+                                                               LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n");
                                                                continue;
                                                        }
                                                        else
                                                        {
-                                                               print("Can't change teams when currently not playing a team game.\n");
+                                                               LOG_INFO("Can't change teams when currently not playing a team game.\n");
                                                                return;
                                                        }
                                                }
                                                else
                                                {
-                                                       print("Can't change teams if the player isn't in the game.\n"); // well technically we could, but should we allow that? :P
+                                                       LOG_INFO("Can't change teams if the player isn't in the game.\n"); // well technically we could, but should we allow that? :P
                                                        return;
                                                }
                                        }
@@ -1157,23 +1157,23 @@ void GameCommand_moveplayer(float request, float argc)
                                if(successful)
                                        bprint("Successfully moved players ", successful, " to destination ", destination, ".\n");
                                else
-                                       print("No players given (", original_targets, ") are able to move.\n");
+                                       LOG_INFO("No players given (", original_targets, ") are able to move.\n");
 
                                return; // still correct parameters so return to avoid usage print
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2moveplayer^7\n");
+                       LOG_INFO("Incorrect parameters for ^2moveplayer^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd moveplayer clients destination\n");
-                       print("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
-                       print("  'destination' is what to send the player to, be it team or spectating\n");
-                       print("  Full list of destinations here: \"spec, spectator, red, blue, yellow, pink, auto.\"\n");
-                       print("Examples: sv_cmd moveplayer 1,3,5 red 3\n");
-                       print("          sv_cmd moveplayer 2 spec \n");
-                       print("See also: ^2allspec, shuffleteams^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd moveplayer clients destination\n");
+                       LOG_INFO("  'clients' is a list (separated by commas) of player entity ID's or nicknames\n");
+                       LOG_INFO("  'destination' is what to send the player to, be it team or spectating\n");
+                       LOG_INFO("  Full list of destinations here: \"spec, spectator, red, blue, yellow, pink, auto.\"\n");
+                       LOG_INFO("Examples: sv_cmd moveplayer 1,3,5 red 3\n");
+                       LOG_INFO("          sv_cmd moveplayer 2 spec \n");
+                       LOG_INFO("See also: ^2allspec, shuffleteams^7\n");
                        return;
                }
        }
@@ -1203,8 +1203,8 @@ void GameCommand_nospectators(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd nospectators\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd nospectators\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -1230,7 +1230,7 @@ void GameCommand_playerdemo(float request, float argc)
 
                                                if(accepted <= 0)
                                                {
-                                                       print("playerdemo: read: ", GetClientErrorString(accepted, argv(2)), ".\n");
+                                                       LOG_INFO("playerdemo: read: ", GetClientErrorString(accepted, argv(2)), ".\n");
                                                        return;
                                                }
 
@@ -1246,7 +1246,7 @@ void GameCommand_playerdemo(float request, float argc)
 
                                                if(accepted <= 0)
                                                {
-                                                       print("playerdemo: write: ", GetClientErrorString(accepted, argv(2)), ".\n");
+                                                       LOG_INFO("playerdemo: write: ", GetClientErrorString(accepted, argv(2)), ".\n");
                                                        return;
                                                }
 
@@ -1281,11 +1281,11 @@ void GameCommand_playerdemo(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2playerdemo^7\n");
+                       LOG_INFO("Incorrect parameters for ^2playerdemo^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd playerdemo command (entitynumber filename | entitynumber botnumber)\n");
-                       print("  Full list of commands here: \"read, write, auto_read_and_write, auto_read.\"\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd playerdemo command (entitynumber filename | entitynumber botnumber)\n");
+                       LOG_INFO("  Full list of commands here: \"read, write, auto_read_and_write, auto_read.\"\n");
                        return;
                }
        }
@@ -1298,15 +1298,15 @@ void GameCommand_printstats(float request)
                case CMD_REQUEST_COMMAND:
                {
                        DumpStats(false);
-                       print("stats dumped.\n");
+                       LOG_INFO("stats dumped.\n");
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd printstats\n");
-                       print("  No arguments required.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd printstats\n");
+                       LOG_INFO("  No arguments required.\n");
                        return;
                }
        }
@@ -1323,13 +1323,13 @@ void GameCommand_radarmap(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2radarmap^7\n");
+                       LOG_INFO("Incorrect parameters for ^2radarmap^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd radarmap [--force] [--loop] [--quit] [--block | --trace | --sample | --lineblock] [--sharpen N] [--res W H] [--qual Q]\n");
-                       print("  The quality factor Q is roughly proportional to the time taken.\n");
-                       print("  trace supports no quality factor; its result should look like --block with infinite quality factor.\n");
-                       print("See also: ^2make_mapinfo^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd radarmap [--force] [--loop] [--quit] [--block | --trace | --sample | --lineblock] [--sharpen N] [--res W H] [--qual Q]\n");
+                       LOG_INFO("  The quality factor Q is roughly proportional to the time taken.\n");
+                       LOG_INFO("  trace supports no quality factor; its result should look like --block with infinite quality factor.\n");
+                       LOG_INFO("See also: ^2make_mapinfo^7\n");
                        return;
                }
        }
@@ -1348,9 +1348,9 @@ void GameCommand_reducematchtime(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd reducematchtime\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2extendmatchtime^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd reducematchtime\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2extendmatchtime^7\n");
                        return;
                }
        }
@@ -1372,12 +1372,12 @@ void GameCommand_setbots(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2setbots^7\n");
+                       LOG_INFO("Incorrect parameters for ^2setbots^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd setbots botnumber\n");
-                       print("  Where 'botnumber' is the amount of bots to set bot_number cvar to.\n");
-                       print("See also: ^2bot_cmd^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd setbots botnumber\n");
+                       LOG_INFO("  Where 'botnumber' is the amount of bots to set bot_number cvar to.\n");
+                       LOG_INFO("See also: ^2bot_cmd^7\n");
                        return;
                }
        }
@@ -1475,7 +1475,7 @@ void GameCommand_shuffleteams(float request)
                        }
                        else
                        {
-                               print("Can't shuffle teams when currently not playing a team game.\n");
+                               LOG_INFO("Can't shuffle teams when currently not playing a team game.\n");
                        }
 
                        return;
@@ -1484,9 +1484,9 @@ void GameCommand_shuffleteams(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd shuffleteams\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2moveplayer, allspec^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd shuffleteams\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2moveplayer, allspec^7\n");
                        return;
                }
        }
@@ -1512,29 +1512,29 @@ void GameCommand_stuffto(float request, float argc)
                                if(accepted > 0)
                                {
                                        stuffcmd(client, strcat("\n", argv(next_token), "\n"));
-                                       print(strcat("Command: \"", argv(next_token), "\" sent to ", GetCallerName(client), " (", argv(1) ,").\n"));
+                                       LOG_INFO(strcat("Command: \"", argv(next_token), "\" sent to ", GetCallerName(client), " (", argv(1) ,").\n"));
                                }
                                else
-                                       print("stuffto: ", GetClientErrorString(accepted, argv(1)), ".\n");
+                                       LOG_INFO("stuffto: ", GetClientErrorString(accepted, argv(1)), ".\n");
 
                                return;
                        }
                }
 
                default:
-                       print("Incorrect parameters for ^2stuffto^7\n");
+                       LOG_INFO("Incorrect parameters for ^2stuffto^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd stuffto client \"command\"\n");
-                       print("  'client' is the entity number or name of the player,\n");
-                       print("  and 'command' is the command to be sent to that player.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd stuffto client \"command\"\n");
+                       LOG_INFO("  'client' is the entity number or name of the player,\n");
+                       LOG_INFO("  and 'command' is the command to be sent to that player.\n");
                        return;
                }
        }
        #else
        if(request)
        {
-               print("stuffto command is not enabled on this server.\n");
+               LOG_INFO("stuffto command is not enabled on this server.\n");
                return;
        }
        #endif
@@ -1555,7 +1555,7 @@ void GameCommand_trace(float request, float argc)
                                case "debug":
                                {
                                        float hitcount = 0;
-                                       print("TEST CASE. If this returns the runaway loop counter error, possibly everything is oaky.\n");
+                                       LOG_INFO("TEST CASE. If this returns the runaway loop counter error, possibly everything is oaky.\n");
                                        float worst_endpos_bug = 0;
                                        for (;;)
                                        {
@@ -1604,14 +1604,14 @@ void GameCommand_trace(float request, float argc)
                                                                        }
                                                                }
 
-                                                               print("safe distance to back off: ", ftos(safe * vlen(p - start)), "qu\n");
-                                                               print("unsafe distance to back off: ", ftos(unsafe * vlen(p - start)), "qu\n");
+                                                               LOG_INFO("safe distance to back off: ", ftos(safe * vlen(p - start)), "qu\n");
+                                                               LOG_INFO("unsafe distance to back off: ", ftos(unsafe * vlen(p - start)), "qu\n");
 
                                                                tracebox(p, PL_MIN + '0.1 0.1 0.1', PL_MAX - '0.1 0.1 0.1', p, MOVE_NOMONSTERS, world);
                                                                if(trace_startsolid)
-                                                                       print("trace_endpos much in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
+                                                                       LOG_INFO("trace_endpos much in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
                                                                else
-                                                                       print("trace_endpos just in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
+                                                                       LOG_INFO("trace_endpos just in solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
                                                                if (++hitcount >= 10)
                                                                        break;
                                                        }
@@ -1636,8 +1636,8 @@ void GameCommand_trace(float request, float argc)
                                                                if(dq > worst_endpos_bug)
                                                                {
                                                                        worst_endpos_bug = dq;
-                                                                       print("trace_endpos still before solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
-                                                                       print("could go ", ftos(dq), " units further to ", vtos(q), "\n");
+                                                                       LOG_INFO("trace_endpos still before solid when tracing from ", vtos(start), " to ", vtos(end), " endpos ", vtos(p), "\n");
+                                                                       LOG_INFO("could go ", ftos(dq), " units further to ", vtos(q), "\n");
                                                                        if (++hitcount >= 10)
                                                                                break;
                                                                }
@@ -1654,7 +1654,7 @@ void GameCommand_trace(float request, float argc)
                                        vv = trace_endpos;
                                        if(trace_fraction == 1)
                                        {
-                                               print("not above ground, aborting\n");
+                                               LOG_INFO("not above ground, aborting\n");
                                                return;
                                        }
                                        f = 0;
@@ -1665,16 +1665,16 @@ void GameCommand_trace(float request, float argc)
                                                        dv = -1 * dv;
                                                tracebox(vv, e.mins, e.maxs, vv + dv, MOVE_NORMAL, e);
                                                if(trace_startsolid)
-                                                       print("bug 1\n");
+                                                       LOG_INFO("bug 1\n");
                                                if(trace_fraction == 1)
                                                if(dv.z < f)
                                                {
-                                                       print("bug 2: ", ftos(dv.x), " ", ftos(dv.y), " ", ftos(dv.z));
-                                                       print(" (", ftos(asin(dv.z / vlen(dv)) * 180 / M_PI), " degrees)\n");
+                                                       LOG_INFO("bug 2: ", ftos(dv.x), " ", ftos(dv.y), " ", ftos(dv.z));
+                                                       LOG_INFO(" (", ftos(asin(dv.z / vlen(dv)) * 180 / M_PI), " degrees)\n");
                                                        f = dv.z;
                                                }
                                        }
-                                       print("highest possible dist: ", ftos(f), "\n");
+                                       LOG_INFO("highest possible dist: ", ftos(f), "\n");
                                        return;
                                }
 
@@ -1684,9 +1684,9 @@ void GameCommand_trace(float request, float argc)
                                        {
                                                e = nextent(world);
                                                if(tracewalk(e, stov(argv(2)), e.mins, e.maxs, stov(argv(3)), MOVE_NORMAL))
-                                                       print("can walk\n");
+                                                       LOG_INFO("can walk\n");
                                                else
-                                                       print("cannot walk\n");
+                                                       LOG_INFO("cannot walk\n");
                                                return;
                                        }
                                }
@@ -1709,12 +1709,12 @@ void GameCommand_trace(float request, float argc)
                }
 
                default:
-                       print("Incorrect parameters for ^2trace^7\n");
+                       LOG_INFO("Incorrect parameters for ^2trace^7\n");
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd trace command (startpos endpos)\n");
-                       print("  Full list of commands here: \"debug, debug2, walk, showline.\"\n");
-                       print("See also: ^2bbox, gettaginfo^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd trace command (startpos endpos)\n");
+                       LOG_INFO("  Full list of commands here: \"debug, debug2, walk, showline.\"\n");
+                       LOG_INFO("See also: ^2bbox, gettaginfo^7\n");
                        return;
                }
        }
@@ -1741,9 +1741,9 @@ void GameCommand_unlockteams(float request)
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd unlockteams\n");
-                       print("  No arguments required.\n");
-                       print("See also: ^2lockteams^7\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd unlockteams\n");
+                       LOG_INFO("  No arguments required.\n");
+                       LOG_INFO("See also: ^2lockteams^7\n");
                        return;
                }
        }
@@ -1760,25 +1760,25 @@ void GameCommand_warp(float request, float argc)
                                if(argc >= 2)
                                {
                                        CampaignLevelWarp(stof(argv(1)));
-                                       print("Successfully warped to campaign level ", stof(argv(1)), ".\n");
+                                       LOG_INFO("Successfully warped to campaign level ", stof(argv(1)), ".\n");
                                }
                                else
                                {
                                        CampaignLevelWarp(-1);
-                                       print("Successfully warped to next campaign level.\n");
+                                       LOG_INFO("Successfully warped to next campaign level.\n");
                                }
                        }
                        else
-                               print("Not in campaign, can't level warp\n");
+                               LOG_INFO("Not in campaign, can't level warp\n");
                        return;
                }
 
                default:
                case CMD_REQUEST_USAGE:
                {
-                       print("\nUsage:^3 sv_cmd warp [level]\n");
-                       print("  'level' is the level to change campaign mode to.\n");
-                       print("  if 'level' is not provided it will change to the next level.\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd warp [level]\n");
+                       LOG_INFO("  'level' is the level to change campaign mode to.\n");
+                       LOG_INFO("  if 'level' is not provided it will change to the next level.\n");
                        return;
                }
        }
@@ -1852,7 +1852,7 @@ void GameCommand_(float request)
 void GameCommand_macro_help()
 {
        #define SERVER_COMMAND(name,function,description) \
-               { print("  ^2", name, "^7: ", description, "\n"); }
+               { LOG_INFO("  ^2", name, "^7: ", description, "\n"); }
 
        SERVER_COMMANDS(0, 0, "");
        #undef SERVER_COMMAND
@@ -1912,20 +1912,20 @@ void GameCommand(string command)
        {
                if(argc == 1)
                {
-                       print("\nServer console commands:\n");
+                       LOG_INFO("\nServer console commands:\n");
                        GameCommand_macro_help();
 
-                       print("\nBanning commands:\n");
+                       LOG_INFO("\nBanning commands:\n");
                        BanCommand_macro_help();
 
-                       print("\nCommon networked commands:\n");
+                       LOG_INFO("\nCommon networked commands:\n");
                        CommonCommand_macro_help(world);
 
-                       print("\nGeneric commands shared by all programs:\n");
+                       LOG_INFO("\nGeneric commands shared by all programs:\n");
                        GenericCommand_macro_help();
 
-                       print("\nUsage:^3 sv_cmd COMMAND...^7, where possible commands are listed above.\n");
-                       print("For help about a specific command, type sv_cmd help COMMAND\n");
+                       LOG_INFO("\nUsage:^3 sv_cmd COMMAND...^7, where possible commands are listed above.\n");
+                       LOG_INFO("For help about a specific command, type sv_cmd help COMMAND\n");
 
                        return;
                }
@@ -1964,7 +1964,7 @@ void GameCommand(string command)
        }
 
        // nothing above caught the command, must be invalid
-       print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n");
+       LOG_INFO(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n");
 
        return;
 }
index 52b15b0953fabc047fcefb668db5c6143bb6221f..40dbf1aefa9f99822433ffbdae96ddd2fbf3cd6e 100644 (file)
@@ -22,7 +22,7 @@
 
 void entcs_init()
 {
-       print("Initializing ClientSide information entities\n");
+       LOG_INFO("Initializing ClientSide information entities\n");
 }
 
 float entcs_customize()
index 967a475e17c577e3929bed7a10e0307f1bda0627..e1b9559c36a694b72b507babedb1cfa1701d0ed4 100644 (file)
@@ -297,7 +297,7 @@ float Obituary_WeaponDeath(
                }
                else
                {
-                       dprintf(
+                       LOG_TRACEF(
                                "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %d!\n",
                                deathtype,
                                death_weapon
@@ -1040,13 +1040,13 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                mininv_f = (vlen(force) * (1-tfloorforce)) / autocvar_g_throughfloor_force_max_stddev;
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       printf("THROUGHFLOOR: D=%f F=%f max(dD)=1/%f max(dF)=1/%f", finaldmg, vlen(force), mininv_d, mininv_f);
+                                                       LOG_INFOF("THROUGHFLOOR: D=%f F=%f max(dD)=1/%f max(dF)=1/%f", finaldmg, vlen(force), mininv_d, mininv_f);
 
 
                                                total = 0.25 * pow(max(mininv_f, mininv_d), 2);
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       printf(" steps=%f", total);
+                                                       LOG_INFOF(" steps=%f", total);
 
 
                                                if (IS_PLAYER(targ))
@@ -1055,7 +1055,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                        total = ceil(bound(autocvar_g_throughfloor_min_steps_other, total, autocvar_g_throughfloor_max_steps_other));
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       printf(" steps=%f dD=%f dF=%f", total, finaldmg * (1-tfloordmg) / (2 * sqrt(total)), vlen(force) * (1-tfloorforce) / (2 * sqrt(total)));
+                                                       LOG_INFOF(" steps=%f dD=%f dF=%f", total, finaldmg * (1-tfloordmg) / (2 * sqrt(total)), vlen(force) * (1-tfloorforce) / (2 * sqrt(total)));
 
                                                for(c = 0; c < total; ++c)
                                                {
@@ -1082,7 +1082,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                                force = force * a;
 
                                                if(autocvar_g_throughfloor_debug)
-                                                       printf(" D=%f F=%f\n", finaldmg, vlen(force));
+                                                       LOG_INFOF(" D=%f F=%f\n", finaldmg, vlen(force));
                                        }
 
                                        //if (targ == attacker)
index 01bf62f82ba37591ecfa10ba47ddc0fe74a7eccb..3a242dcf32a81f157220ee8f95446589193aeaec 100644 (file)
@@ -187,10 +187,10 @@ float tracebox_inverted (vector v1, vector mi, vector ma, vector v2, float nomon
 
                if(c == 50)
                {
-                       dprint("HOLY SHIT! When tracing from ", vtos(v1), " to ", vtos(v2), "\n");
-                       dprint("  Nudging gets us nowhere at ", vtos(pos), "\n");
-                       dprint("  trace_endpos is ", vtos(trace_endpos), "\n");
-                       dprint("  trace distance is ", ftos(vlen(pos - trace_endpos)), "\n");
+                       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");
                }
 
                stopentity = trace_ent;
index 70a316386e83d89458bca578c84284acb725eb5c..54577eca7429b9fe726d8edc3d12a0172a2ff9b4 100644 (file)
@@ -305,8 +305,8 @@ void PieceMinsMaxs(float rot, float pc)
                // TODO OPTIMIZE
        }
 #ifdef VERIFY
-       print(vtos(tet_piecemins), "-");
-       print(vtos(tet_piecemaxs), "\n");
+       LOG_INFO(vtos(tet_piecemins), "-");
+       LOG_INFO(vtos(tet_piecemaxs), "\n");
        if(tet_piecemins.x > tet_piecemaxs.x)
                error("inconsistent mins/maxs");
        if(tet_piecemins.y > tet_piecemaxs.y)
@@ -548,12 +548,12 @@ void PrintField()
        for(r = 1; r <= TET_LINES; ++r)
        {
                l = GetLine(r);
-               print(">");
+               LOG_INFO(">");
                for(c = 1; c <= TET_WIDTH; ++c)
                {
-                       print(ftos(GetXBlock(c, l)));
+                       LOG_INFO(ftos(GetXBlock(c, l)));
                }
-               print("\n");
+               LOG_INFO("\n");
        }
 }
 
@@ -706,7 +706,7 @@ float BastetPiece()
        b = buf_create(); bastet_piece[6] = 7; bastet_score[6] = BastetSearch(b, 7, TET_START_PIECE_POS_x, 1+TET_START_PIECE_POS_y, TET_START_PIECE_POS_y, TET_WIDTH) + 100 * random() + bastet_piecetime[6]; buf_del(b);
 
        float t2 = gettime(GETTIME_HIRES);
-       dprintf("Time taken: %.6f seconds (of this, ev = %.2f%%, cm = %.2f%%)\n", t2 - t1, 100 * bastet_profile_evaluate_time / (t2 - t1), 100 * bastet_profile_checkmetrics_time / (t2 - t1));
+       LOG_TRACEF("Time taken: %.6f seconds (of this, ev = %.2f%%, cm = %.2f%%)\n", t2 - t1, 100 * bastet_profile_evaluate_time / (t2 - t1), 100 * bastet_profile_checkmetrics_time / (t2 - t1));
 
        // sort
        float i, j, k, p, s;
@@ -1256,7 +1256,7 @@ float TetrisPostFrame()
        if (autocvar_g_bastet)
        {
                cvar_set("g_bastet", "0");
-               print("The useless cvar has been toggled.\n");
+               LOG_INFO("The useless cvar has been toggled.\n");
        }
        return 0;
 }
index 722a8da753cd7158b72cb5d4cca6e47968b6ddaa..c921dd7d0004dcce4a22c53d0beec1a90443b8b2 100644 (file)
@@ -146,7 +146,7 @@ void GotoFirstMap()
        else
        {
                self.nextthink = time + 1;
-               print("Waiting for _sv_init being set to 1 by initialization scripts...\n");
+               LOG_INFO("Waiting for _sv_init being set to 1 by initialization scripts...\n");
        }
 }
 
@@ -501,7 +501,7 @@ void detect_maptype()
                        tracebox(o, '-1 -1 -1' * i, '1 1 1' * i, o - '0 0 32768', MOVE_WORLDONLY, world);
        if(trace_fraction == 1)
                continue;
-                       print(ftos(i), " -> ", vtos(trace_endpos), "\n");
+                       LOG_INFO(ftos(i), " -> ", vtos(trace_endpos), "\n");
                }
 
                break;
@@ -755,23 +755,23 @@ void spawnfunc_worldspawn (void)
                                        continue;
                                if(argv(0) == "cd")
                                {
-                                       print("Found ^1UNSUPPORTED^7 cd loop command in .cfg file; put this line in mapinfo instead:\n");
-                                       print("  cdtrack ", argv(2), "\n");
+                                       LOG_INFO("Found ^1UNSUPPORTED^7 cd loop command in .cfg file; put this line in mapinfo instead:\n");
+                                       LOG_INFO("  cdtrack ", argv(2), "\n");
                                }
                                else if(argv(0) == "fog")
                                {
-                                       print("Found ^1UNSUPPORTED^7 fog command in .cfg file; put this line in worldspawn in the .map/.bsp/.ent file instead:\n");
-                                       print("  \"fog\" \"", s, "\"\n");
+                                       LOG_INFO("Found ^1UNSUPPORTED^7 fog command in .cfg file; put this line in worldspawn in the .map/.bsp/.ent file instead:\n");
+                                       LOG_INFO("  \"fog\" \"", s, "\"\n");
                                }
                                else if(argv(0) == "set")
                                {
-                                       print("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n");
-                                       print("  clientsettemp_for_type all ", argv(1), " ", argv(2), "\n");
+                                       LOG_INFO("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n");
+                                       LOG_INFO("  clientsettemp_for_type all ", argv(1), " ", argv(2), "\n");
                                }
                                else if(argv(0) != "//")
                                {
-                                       print("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n");
-                                       print("  clientsettemp_for_type all ", argv(0), " ", argv(1), "\n");
+                                       LOG_INFO("Found ^1UNSUPPORTED^7 set command in .cfg file; put this line in mapinfo instead:\n");
+                                       LOG_INFO("  clientsettemp_for_type all ", argv(0), " ", argv(1), "\n");
                                }
                        }
                        fclose(fd);
@@ -972,39 +972,39 @@ float MapHasRightSize(string map)
        if(currentbots || autocvar_bot_number || player_count < autocvar_minplayers)
        if(autocvar_g_maplist_check_waypoints)
        {
-               dprint("checkwp "); dprint(map);
+               LOG_TRACE("checkwp "); LOG_TRACE(map);
                if(!fexists(strcat("maps/", map, ".waypoints")))
                {
-                       dprint(": no waypoints\n");
+                       LOG_TRACE(": no waypoints\n");
                        return false;
                }
-               dprint(": has waypoints\n");
+               LOG_TRACE(": has waypoints\n");
        }
 
        // open map size restriction file
-       dprint("opensize "); dprint(map);
+       LOG_TRACE("opensize "); LOG_TRACE(map);
        fh = fopen(strcat("maps/", map, ".sizes"), FILE_READ);
        if(fh >= 0)
        {
                float mapmin, mapmax;
-               dprint(": ok, ");
+               LOG_TRACE(": ok, ");
                mapmin = stof(fgets(fh));
                mapmax = stof(fgets(fh));
                fclose(fh);
                if(player_count < mapmin)
                {
-                       dprint("not enough\n");
+                       LOG_TRACE("not enough\n");
                        return false;
                }
                if(player_count > mapmax)
                {
-                       dprint("too many\n");
+                       LOG_TRACE("too many\n");
                        return false;
                }
-               dprint("right size\n");
+               LOG_TRACE("right size\n");
                return true;
        }
-       dprint(": not found\n");
+       LOG_TRACE(": not found\n");
        return true;
 }
 
@@ -1059,7 +1059,7 @@ float Map_Check(float position, float pass)
                return 0;
        }
        else
-               dprint( "Couldn't select '", filename, "'..\n" );
+               LOG_TRACE( "Couldn't select '", filename, "'..\n" );
 
        return 0;
 }
@@ -1092,7 +1092,7 @@ float() MaplistMethod_Iterate = // usual method
 {
        float pass, i;
 
-       dprint("Trying MaplistMethod_Iterate\n");
+       LOG_TRACE("Trying MaplistMethod_Iterate\n");
 
        for(pass = 1; pass <= 2; ++pass)
        {
@@ -1109,7 +1109,7 @@ float() MaplistMethod_Iterate = // usual method
 
 float() MaplistMethod_Repeat = // fallback method
 {
-       dprint("Trying MaplistMethod_Repeat\n");
+       LOG_TRACE("Trying MaplistMethod_Repeat\n");
 
        if(Map_Check(Map_Current, 2))
                return Map_Current;
@@ -1120,7 +1120,7 @@ float() MaplistMethod_Random = // random map selection
 {
        float i, imax;
 
-       dprint("Trying MaplistMethod_Random\n");
+       LOG_TRACE("Trying MaplistMethod_Random\n");
 
        imax = 42;
 
@@ -1140,7 +1140,7 @@ float(float exponent) MaplistMethod_Shuffle = // more clever shuffling
 {
        float i, j, imax, insertpos;
 
-       dprint("Trying MaplistMethod_Shuffle\n");
+       LOG_TRACE("Trying MaplistMethod_Shuffle\n");
 
        imax = 42;
 
@@ -1152,7 +1152,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}
-               dprint("SHUFFLE: insert pos = ", ftos(insertpos), "\n");
+               LOG_TRACE("SHUFFLE: insert pos = ", ftos(insertpos), "\n");
 
                // insert the current map there
                newlist = "";
@@ -1428,7 +1428,7 @@ void DumpStats(float final)
        s = strcat(s, GetGametype(), "_", GetMapname(), ":", ftos(rint(time)));
 
        if(to_console)
-               print(s, "\n");
+               LOG_INFO(s, "\n");
        if(to_eventlog)
                GameLogEcho(s);
 
@@ -1444,7 +1444,7 @@ void DumpStats(float final)
 
        s = strcat(":labels:player:", GetPlayerScoreString(world, 0));
        if(to_console)
-               print(s, "\n");
+               LOG_INFO(s, "\n");
        if(to_eventlog)
                GameLogEcho(s);
        if(to_file)
@@ -1462,7 +1462,7 @@ void DumpStats(float final)
                                s = strcat(s, "spectator:");
 
                        if(to_console)
-                               print(s, other.netname, "\n");
+                               LOG_INFO(s, other.netname, "\n");
                        if(to_eventlog)
                                GameLogEcho(strcat(s, ftos(other.playerid), ":", other.netname));
                        if(to_file)
@@ -1474,7 +1474,7 @@ void DumpStats(float final)
        {
                s = strcat(":labels:teamscores:", GetTeamScoreString(0, 0));
                if(to_console)
-                       print(s, "\n");
+                       LOG_INFO(s, "\n");
                if(to_eventlog)
                        GameLogEcho(s);
                if(to_file)
@@ -1485,7 +1485,7 @@ void DumpStats(float final)
                        s = strcat(":teamscores:see-labels:", GetTeamScoreString(i, 0));
                        s = strcat(s, ":", ftos(i));
                        if(to_console)
-                               print(s, "\n");
+                               LOG_INFO(s, "\n");
                        if(to_eventlog)
                                GameLogEcho(s);
                        if(to_file)
@@ -1494,7 +1494,7 @@ void DumpStats(float final)
        }
 
        if(to_console)
-               print(":end\n");
+               LOG_INFO(":end\n");
        if(to_eventlog)
                GameLogEcho(":end");
        if(to_file)
@@ -1799,7 +1799,7 @@ float WinningCondition_LMS()
                {
                        // SNAFU (maybe a draw game?)
                        ClearWinners();
-                       dprint("No players, ending game.\n");
+                       LOG_TRACE("No players, ending game.\n");
                        return WINNING_YES;
                }
        }
@@ -2266,7 +2266,7 @@ float RedirectionThink()
        FOR_EACH_REALCLIENT(self)
        {
                // TODO add timer
-               print("Redirecting: sending connect command to ", self.netname, "\n");
+               LOG_INFO("Redirecting: sending connect command to ", self.netname, "\n");
                if(redirection_target == "self")
                        stuffcmd(self, "\ndisconnect; defer ", ftos(autocvar_quit_and_redirect_timer), " reconnect\n");
                else
@@ -2274,7 +2274,7 @@ float RedirectionThink()
                ++clients_found;
        }
 
-       print("Redirecting: ", ftos(clients_found), " clients left.\n");
+       LOG_INFO("Redirecting: ", ftos(clients_found), " clients left.\n");
 
        if(time > redirection_timeout || clients_found == 0)
                localcmd("\nwait; wait; wait; quit\n");
@@ -2307,7 +2307,7 @@ void Shutdown()
        if(world_initialized > 0)
        {
                world_initialized = 0;
-               print("Saving persistent data...\n");
+               LOG_INFO("Saving persistent data...\n");
                Ban_SaveBans();
 
                // playerstats with unfinished match
@@ -2330,7 +2330,7 @@ void Shutdown()
                CheatShutdown(); // must be after cheatcount check
                db_close(ServerProgsDB);
                db_close(TemporaryDB);
-               print("done!\n");
+               LOG_INFO("done!\n");
                // tell the bot system the game is ending now
                bot_endgame();
 
@@ -2339,6 +2339,6 @@ void Shutdown()
        }
        else if(world_initialized == 0)
        {
-               print("NOTE: crashed before even initializing the world, not saving persistent data\n");
+               LOG_INFO("NOTE: crashed before even initializing the world, not saving persistent data\n");
        }
 }
index db758a8e6d41bab7300654d865c6bef18b982eb7..671137a645f37ae20583d838732205f1304f29e4 100644 (file)
@@ -94,18 +94,18 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
 
        if(id >= MAX_IPBAN_URIS)
        {
-               print("Received ban list for invalid ID\n");
+               LOG_INFO("Received ban list for invalid ID\n");
                return;
        }
 
        tokenize_console(autocvar_g_ban_sync_uri);
        uri = argv(id);
 
-       print("Received ban list from ", uri, ": ");
+       LOG_INFO("Received ban list from ", uri, ": ");
 
        if(OnlineBanList_RequestWaiting[id] == 0)
        {
-               print("rejected (unexpected)\n");
+               LOG_INFO("rejected (unexpected)\n");
                return;
        }
 
@@ -113,14 +113,14 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
 
        if(time > OnlineBanList_Timeout)
        {
-               print("rejected (too late)\n");
+               LOG_INFO("rejected (too late)\n");
                return;
        }
 
        syncinterval = autocvar_g_ban_sync_interval;
        if(syncinterval == 0)
        {
-               print("rejected (syncing disabled)\n");
+               LOG_INFO("rejected (syncing disabled)\n");
                return;
        }
        if(syncinterval > 0)
@@ -128,19 +128,19 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
 
        if(status != 0)
        {
-               print("error: status is ", ftos(status), "\n");
+               LOG_INFO("error: status is ", ftos(status), "\n");
                return;
        }
 
        if(substring(data, 0, 1) == "<")
        {
-               print("error: received HTML instead of a ban list\n");
+               LOG_INFO("error: received HTML instead of a ban list\n");
                return;
        }
 
        if(strstrofs(data, "\r", 0) != -1)
        {
-               print("error: received carriage returns\n");
+               LOG_INFO("error: received carriage returns\n");
                return;
        }
 
@@ -151,11 +151,11 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
 
        if((n % 4) != 0)
        {
-               print("error: received invalid item count: ", ftos(n), "\n");
+               LOG_INFO("error: received invalid item count: ", ftos(n), "\n");
                return;
        }
 
-       print("OK, ", ftos(n / 4), " items\n");
+       LOG_INFO("OK, ", ftos(n / 4), " items\n");
 
        for(i = 0; i < n; i += 4)
        {
@@ -164,9 +164,9 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
                reason = argv(i + 2);
                serverip = argv(i + 3);
 
-               dprint("received ban list item ", ftos(i / 4), ": ip=", ip);
-               dprint(" timeleft=", ftos(timeleft), " reason=", reason);
-               dprint(" serverip=", serverip, "\n");
+               LOG_TRACE("received ban list item ", ftos(i / 4), ": ip=", ip);
+               LOG_TRACE(" timeleft=", ftos(timeleft), " reason=", reason);
+               LOG_TRACE(" serverip=", serverip, "\n");
 
                timeleft -= 1.5 * autocvar_g_ban_sync_timeout;
                if(timeleft < 0)
@@ -178,7 +178,7 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
                        for(j = 0; j < l; ++j)
                                if(strstrofs("0123456789.", substring(ip, j, 1), 0) == -1)
                                {
-                                       print("Invalid character ", substring(ip, j, 1), " in IP address ", ip, ". Skipping this ban.\n");
+                                       LOG_INFO("Invalid character ", substring(ip, j, 1), " in IP address ", ip, ". Skipping this ban.\n");
                                        goto skip;
                                }
                }
@@ -192,8 +192,8 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
                        // the ban will be prolonged on the next sync
                        // or expire 5 seconds after the next timeout
                Ban_Insert(ip, timeleft, strcat("ban synced from ", serverip, " at ", uri), 0);
-               print("Ban list syncing: accepted ban of ", ip, " by ", serverip, " at ", uri, ": ");
-               print(reason, "\n");
+               LOG_INFO("Ban list syncing: accepted ban of ", ip, " by ", serverip, " at ", uri, ": ");
+               LOG_INFO(reason, "\n");
 
 :skip
        }
@@ -333,7 +333,7 @@ void Ban_View()
        float i, n;
        string msg;
 
-       print("^2Listing all existing active bans:\n");
+       LOG_INFO("^2Listing all existing active bans:\n");
 
        n = 0;
        for(i = 0; i < ban_count; ++i)
@@ -347,10 +347,10 @@ void Ban_View()
                msg = strcat(msg, ban_ip[i], " is still banned for ");
                msg = strcat(msg, ftos(ban_expire[i] - time), " seconds");
 
-               print("  ", msg, "\n");
+               LOG_INFO("  ", msg, "\n");
        }
 
-       print("^2Done listing all active (", ftos(n), ") bans.\n");
+       LOG_INFO("^2Done listing all active (", ftos(n), ") bans.\n");
 }
 
 float Ban_GetClientIP(entity client)
@@ -514,10 +514,10 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync)
                        if(time + bantime > ban_expire[i])
                        {
                                ban_expire[i] = time + bantime;
-                               dprint(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\n");
                        }
                        else
-                               dprint(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\n");
 
                        // and enforce
                        reason = Ban_Enforce(i, reason);
@@ -554,12 +554,12 @@ float Ban_Insert(string ip, float bantime, string reason, float dosync)
        if(i < ban_count)
        if(ban_expire[i] > time + bantime)
        {
-               print(ip, " could not get banned due to no free ban slot\n");
+               LOG_INFO(ip, " could not get banned due to no free ban slot\n");
                return false;
        }
        // okay, insert our new victim as i
        Ban_Delete(i);
-       dprint(ip, " has been banned for ", ftos(bantime), " seconds\n");
+       LOG_TRACE(ip, " has been banned for ", ftos(bantime), " seconds\n");
        ban_expire[i] = time + bantime;
        ban_ip[i] = strzone(ip);
        ban_count = max(ban_count, i + 1);
index 952ce5bd0595ff40273229587503bf58403717a3..d453606d3946419c660cd4693d98730010b3f874 100644 (file)
@@ -748,7 +748,7 @@ float GameTypeVote_Finished(float pos)
 
        if ( !GameTypeVote_SetGametype(GameTypeVote_Type_FromString(mapvote_maps[pos])) )
        {
-               dprint("Selected gametype is not supported by any map");
+               LOG_TRACE("Selected gametype is not supported by any map");
        }
 
        localcmd("sv_vote_gametype_hook_all\n");
index 0dabbf0fa38df393b90c894315ffc61028144a3f..d31287da6cf6c8e9576e4c6df79faa27550deb57 100644 (file)
@@ -62,8 +62,8 @@ void DistributeEvenly_Init(float amount, float totalweight)
 {
     if (DistributeEvenly_amount)
     {
-        dprint("DistributeEvenly_Init: UNFINISHED DISTRIBUTION (", ftos(DistributeEvenly_amount), " for ");
-        dprint(ftos(DistributeEvenly_totalweight), " left!)\n");
+        LOG_TRACE("DistributeEvenly_Init: UNFINISHED DISTRIBUTION (", ftos(DistributeEvenly_amount), " for ");
+        LOG_TRACE(ftos(DistributeEvenly_totalweight), " left!)\n");
     }
     if (totalweight == 0)
         DistributeEvenly_amount = 0;
@@ -122,7 +122,7 @@ void GameLogEcho(string s)
     }
     if (autocvar_sv_eventlog_console)
     {
-        print(s, "\n");
+        LOG_INFO(s, "\n");
     }
 }
 
@@ -195,9 +195,9 @@ entity findnearest(vector point, .string field, string value, vector axismod)
         {
             if (i != 0)
             {
-                dprint("Nearest point (");
-                dprint(nearest_entity[0].netname);
-                dprint(") is not visible, using a visible one.\n");
+                LOG_TRACE("Nearest point (");
+                LOG_TRACE(nearest_entity[0].netname);
+                LOG_TRACE(") is not visible, using a visible one.\n");
             }
             return nearest_entity[i];
         }
@@ -206,7 +206,7 @@ entity findnearest(vector point, .string field, string value, vector axismod)
     if (num_nearest == 0)
         return world;
 
-    dprint("Not seeing any location point, using nearest as fallback.\n");
+    LOG_TRACE("Not seeing any location point, using nearest as fallback.\n");
     /* DEBUGGING CODE:
     dprint("Candidates were: ");
     for(j = 0; j < num_nearest; ++j)
@@ -605,7 +605,7 @@ void readplayerstartcvars()
                        }
                        if (j > WEP_LAST)
                        {
-                               print("The weapon mutator list contains an unknown weapon ", s, ". Skipped.\n");
+                               LOG_INFO("The weapon mutator list contains an unknown weapon ", s, ". Skipped.\n");
                        }
                }
                g_weaponarena_list = strzone(substring(g_weaponarena_list, 0, strlen(g_weaponarena_list) - 3));
@@ -1394,7 +1394,7 @@ float SUB_NoImpactCheck()
        if(trace_dphitcontents == 0)
        {
                //dprint("A hit happened with zero hit contents... DEBUG THIS, this should never happen for projectiles! Projectile will self-destruct.\n");
-               dprintf("A hit from a projectile happened with no hit contents! DEBUG THIS, this should never happen for projectiles! Profectile will self-destruct. (edict: %d, classname: %s, origin: %s)\n", num_for_edict(self), self.classname, vtos(self.origin));
+               LOG_TRACEF("A hit from a projectile happened with no hit contents! DEBUG THIS, this should never happen for projectiles! Profectile will self-destruct. (edict: %d, classname: %s, origin: %s)\n", num_for_edict(self), self.classname, vtos(self.origin));
                checkclient();
        }
     if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
@@ -1407,11 +1407,11 @@ float SUB_NoImpactCheck()
         traceline(self.origin - tic, self.origin + tic, MOVE_NORMAL, self);
         if (trace_fraction >= 1)
         {
-            dprint("Odd... did not hit...?\n");
+            LOG_TRACE("Odd... did not hit...?\n");
         }
         else if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
         {
-            dprint("Detected and prevented the sky-grapple bug.\n");
+            LOG_TRACE("Detected and prevented the sky-grapple bug.\n");
             return 1;
         }
     }
@@ -1469,7 +1469,7 @@ void URI_Get_Callback(float id, float status, string data)
        }
        else
        {
-               print("Received HTTP request data for an invalid id ", ftos(id), ".\n");
+               LOG_INFO("Received HTTP request data for an invalid id ", ftos(id), ".\n");
        }
 }
 
@@ -1598,7 +1598,7 @@ float MoveToRandomMapLocation(entity e, float goodcontents, float badcontents, f
     {
         setorigin(e, start);
         e.angles = vectoangles(end - start);
-        dprint("Needed ", ftos(i + 1), " attempts\n");
+        LOG_TRACE("Needed ", ftos(i + 1), " attempts\n");
         return true;
     }
     else
@@ -1915,7 +1915,7 @@ void randombit_test(float bits, float iter)
 {
        while(iter > 0)
        {
-               print(ftos(randombit(bits)), "\n");
+               LOG_INFO(ftos(randombit(bits)), "\n");
                --iter;
        }
 }
index 65b0ee793245b0bb7a36b00396e1b4c9c61f0bbd..7e13b334d38d5e56a9547d89ddaaaa86e766e966 100644 (file)
@@ -610,7 +610,7 @@ MUTATOR_DEFINITION(gamemode_assault)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 9ad532e909e4dcfd2b56d3d187308db93a999b15..480114c37a59a2a98e1318bdd5ec961f7cffc3e3 100644 (file)
@@ -404,7 +404,7 @@ MUTATOR_DEFINITION(gamemode_ca)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index d6859bee3d88f281b6479d879864fe44e2196089..d79e1310d02cf63c3cde974fc20828954449d8e0 100644 (file)
@@ -591,7 +591,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);
-                       dprint("pickup_dropped_score is ", ftos(pickup_dropped_score), "\n");
+                       LOG_TRACE("pickup_dropped_score is ", ftos(pickup_dropped_score), "\n");
                        PlayerTeamScore_AddScore(player, pickup_dropped_score);
                        ctf_EventLog("pickup", flag.team, player);
                        break;
@@ -767,7 +767,7 @@ void ctf_FlagThink()
 
        // sanity checks
        if(self.mins != FLAG_MIN || self.maxs != FLAG_MAX) { // reset the flag boundaries in case it got squished
-               dprint("wtf the flag got squashed?\n");
+               LOG_TRACE("wtf the flag got squashed?\n");
                tracebox(self.origin, FLAG_MIN, FLAG_MAX, self.origin, MOVE_NOMONSTERS, self);
                if(!trace_startsolid || self.noalign) // can we resize it without getting stuck?
                        setsize(self, FLAG_MIN, FLAG_MAX); }
@@ -896,7 +896,7 @@ void ctf_FlagThink()
 
                default: // this should never happen
                {
-                       dprint("ctf_FlagThink(): Flag exists with no status?\n");
+                       LOG_TRACE("ctf_FlagThink(): Flag exists with no status?\n");
                        return;
                }
        }
@@ -978,7 +978,7 @@ void ctf_FlagTouch()
 
                case FLAG_CARRY:
                {
-                       dprint("Someone touched a flag even though it was being carried?\n");
+                       LOG_TRACE("Someone touched a flag even though it was being carried?\n");
                        break;
                }
 
@@ -1848,47 +1848,47 @@ void havocbot_role_ctf_defense()
 
 void havocbot_role_ctf_setrole(entity bot, int role)
 {
-       dprint(strcat(bot.netname," switched to "));
+       LOG_TRACE(strcat(bot.netname," switched to "));
        switch(role)
        {
                case HAVOCBOT_CTF_ROLE_CARRIER:
-                       dprint("carrier");
+                       LOG_TRACE("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:
-                       dprint("defense");
+                       LOG_TRACE("defense");
                        bot.havocbot_role = havocbot_role_ctf_defense;
                        bot.havocbot_role_timeout = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_MIDDLE:
-                       dprint("middle");
+                       LOG_TRACE("middle");
                        bot.havocbot_role = havocbot_role_ctf_middle;
                        bot.havocbot_role_timeout = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_OFFENSE:
-                       dprint("offense");
+                       LOG_TRACE("offense");
                        bot.havocbot_role = havocbot_role_ctf_offense;
                        bot.havocbot_role_timeout = 0;
                        break;
                case HAVOCBOT_CTF_ROLE_RETRIEVER:
-                       dprint("retriever");
+                       LOG_TRACE("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:
-                       dprint("escort");
+                       LOG_TRACE("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;
        }
-       dprint("\n");
+       LOG_TRACE("\n");
 }
 
 
@@ -2457,7 +2457,7 @@ void ctf_DelayedInit() // Do this check with a delay so we can wait for teams to
        // if no teams are found, spawn defaults
        if(find(world, classname, "ctf_team") == world)
        {
-               print("No ""ctf_team"" entities found on this map, creating them anyway.\n");
+               LOG_INFO("No ""ctf_team"" entities found on this map, creating them anyway.\n");
                ctf_SpawnTeam("Red", NUM_TEAM_1 - 1);
                ctf_SpawnTeam("Blue", NUM_TEAM_2 - 1);
                if(ctf_teams >= 3)
@@ -2518,7 +2518,7 @@ MUTATOR_DEFINITION(gamemode_ctf)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 50aa5e1fc51d48b87c7112c719a6924e2becb01b..04c589ce181a3d920bd0bd744ff923eb08f7e4e3 100644 (file)
@@ -325,7 +325,7 @@ MUTATOR_DEFINITION(gamemode_cts)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index d10cedcd887b99697fc8c1b765b58aaf948db09e..7b392a0663af09b0b65be533388aee3cb211b083 100644 (file)
@@ -597,7 +597,7 @@ void dom_DelayedInit() // Do this check with a delay so we can wait for teams to
        // if no teams are found, spawn defaults
        if(find(world, classname, "dom_team") == world || autocvar_g_domination_teams_override >= 2)
        {
-               print("No ""dom_team"" entities found on this map, creating them anyway.\n");
+               LOG_INFO("No ""dom_team"" entities found on this map, creating them anyway.\n");
                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);
        }
@@ -652,7 +652,7 @@ MUTATOR_DEFINITION(gamemode_domination)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index fd3a9deb407fecfeefc7140f412428ff60ab0ceb..704d992e2c12e4f8e3fb8512aa2314b73405a1f1 100644 (file)
@@ -265,7 +265,7 @@ void havocbot_role_ft_offense()
        // If only one left on team or if role has timed out then start trying to free players.
        if (((unfrozen == 0) && (!self.frozen)) || (time > self.havocbot_role_timeout))
        {
-               dprint("changing role to freeing\n");
+               LOG_TRACE("changing role to freeing\n");
                self.havocbot_role = havocbot_role_ft_freeing;
                self.havocbot_role_timeout = 0;
                return;
@@ -294,7 +294,7 @@ void havocbot_role_ft_freeing()
 
        if (time > self.havocbot_role_timeout)
        {
-               dprint("changing role to offense\n");
+               LOG_TRACE("changing role to offense\n");
                self.havocbot_role = havocbot_role_ft_offense;
                self.havocbot_role_timeout = 0;
                return;
@@ -606,7 +606,7 @@ MUTATOR_DEFINITION(gamemode_freezetag)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 33966bbe7695fdae5e9c61560dd243a70ee5b53d..99639dfec27171e9c04ec2beb9215dc0cdd37cac 100644 (file)
@@ -62,7 +62,7 @@ void invasion_SpawnChosenMonster(float mon)
 
        if(spawn_point == world)
        {
-               dprint("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\n");
                entity e = spawn();
                setsize(e, (get_monsterinfo(mon)).mins, (get_monsterinfo(mon)).maxs);
 
@@ -483,7 +483,7 @@ MUTATOR_DEFINITION(gamemode_invasion)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 01695f5e2f1bbd62a5428fcc94d609bac9d19430..8a2368e522af5dfde357b4bc900ac192bdb90cb6 100644 (file)
@@ -448,7 +448,7 @@ MUTATOR_DEFINITION(gamemode_keepaway)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 1de67e2b071a44872a482ad5de4ec7296141ebc4..fe53c1fcc4dbaf39c7b11da153a19e154f7d159a 100644 (file)
@@ -1140,7 +1140,7 @@ MUTATOR_DEFINITION(gamemode_keyhunt)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 7ed082f49bda79e08fff3837ab9f1d5551ea8c3f..a5707182e4de7125eb68a2bf48efc09c33579738 100644 (file)
@@ -229,7 +229,7 @@ MUTATOR_DEFINITION(gamemode_lms)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 456d0df1f962f6fb4cb099faea1aea1b5741c827..16eeb47d12d106a1254f4e68f368126c3f273e48 100644 (file)
@@ -86,10 +86,10 @@ void relocate_nexball(void)
                o = self.origin;
                if(!move_out_of_solid(self))
                        objerror("could not get out of solid at all!");
-               print("^1NOTE: this map needs FIXING. ", self.classname, " at ", vtos(o - '0 0 1'));
-               print(" needs to be moved out of solid, e.g. by '", ftos(self.origin.x - o.x));
-               print(" ", ftos(self.origin.y - o.y));
-               print(" ", ftos(self.origin.z - o.z), "'\n");
+               LOG_INFO("^1NOTE: this map needs FIXING. ", self.classname, " at ", vtos(o - '0 0 1'));
+               LOG_INFO(" needs to be moved out of solid, e.g. by '", ftos(self.origin.x - o.x));
+               LOG_INFO(" ", ftos(self.origin.y - o.y));
+               LOG_INFO(" ", ftos(self.origin.z - o.z), "'\n");
                self.origin = o;
        }
 }
@@ -241,7 +241,7 @@ void ResetBall(void)
        {
 //             dprint("Step 4: time: ", ftos(time), "\n");
                if(vlen(self.origin - self.spawnorigin) > 10)  // should not happen anymore
-                       dprint("The ball moved too far away from its spawn origin.\nOffset: ",
+                       LOG_TRACE("The ball moved too far away from its spawn origin.\nOffset: ",
                                   vtos(self.origin - self.spawnorigin), " Velocity: ", vtos(self.velocity), "\n");
                self.velocity = '0 0 0';
                setorigin(self, self.spawnorigin); // make sure it's positioned correctly anyway
@@ -423,7 +423,7 @@ void spawnfunc_nexball_team(void)
 
 void nb_spawnteam(string teamname, float teamcolor)
 {
-       dprint("^2spawned team ", teamname, "\n");
+       LOG_TRACE("^2spawned team ", teamname, "\n");
        entity e;
        e = spawn();
        e.classname = "nexball_team";
@@ -1039,7 +1039,7 @@ MUTATOR_DEFINITION(gamemode_nexball)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 708683e6755139802e1bd0d7f84587e9e17ee1f7..a84ffa57d0e4fa8d763aeb36485ebf13956c109f 100644 (file)
@@ -79,8 +79,8 @@ void ons_debug(string input)
 {
        switch(autocvar_g_onslaught_debug)
        {
-               case 1: dprint(input); break;
-               case 2: print(input); break;
+               case 1: LOG_TRACE(input); break;
+               case 2: LOG_INFO(input); break;
        }
 }
 
@@ -2179,7 +2179,7 @@ MUTATOR_DEFINITION(gamemode_onslaught)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index 3cefc86692f6d6e8fbc9d6a094f424bdc5e4b01c..6b07c4da627632c7a63a1454d02577b5ffe95ca1 100644 (file)
@@ -311,7 +311,7 @@ MUTATOR_DEFINITION(gamemode_race)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index afff8bdb2583dc8a187b0814c56e8d75ead365e7..ea0b9a1d2b59604a2f52e0ffe7acf4e5ef3bbc95 100644 (file)
@@ -36,7 +36,7 @@ void tdm_DelayedInit()
        // if no teams are found, spawn defaults
        if(find(world, classname, "tdm_team") == world)
        {
-               print("No ""tdm_team"" entities found on this map, creating them anyway.\n");
+               LOG_INFO("No ""tdm_team"" entities found on this map, creating them anyway.\n");
 
                float numteams = min(4, autocvar_g_tdm_teams_override);
 
@@ -75,7 +75,7 @@ MUTATOR_DEFINITION(gamemode_tdm)
 
        MUTATOR_ONREMOVE
        {
-               print("This is a game type and it cannot be removed at runtime.");
+               LOG_INFO("This is a game type and it cannot be removed at runtime.");
                return -1;
        }
 
index edbdc8aa826f622c62f22fca792285ce9e367154..fa7638b515a50a75212ca76c059aeff12cbbf6c8 100644 (file)
@@ -225,7 +225,7 @@ MUTATOR_DEFINITION(mutator_new_toys)
 
        MUTATOR_ONREMOVE
        {
-               print("This cannot be removed at runtime\n");
+               LOG_INFO("This cannot be removed at runtime\n");
                return -1;
        }
 
index d82bec99fecdaa24f5dea3b7eb0a28fc4e84f4e4..08bb81a9f6a9d6a646a1103a6771b7b23eae7952 100644 (file)
@@ -111,7 +111,7 @@ MUTATOR_DEFINITION(mutator_physical_items)
        {
                if (!(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")))
                {
-                       dprint("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.\n");
                        return -1;
                }
        }
@@ -123,7 +123,7 @@ MUTATOR_DEFINITION(mutator_physical_items)
 
        MUTATOR_ONREMOVE
        {
-               print("This cannot be removed at runtime\n");
+               LOG_INFO("This cannot be removed at runtime\n");
                return -1;
        }
 
index b48deddcfa95c00f8bea029072efd283c2ca72a9..060ed74f831dfe53cbe47ab6fe500b2450b9d28f 100644 (file)
@@ -23,7 +23,7 @@ MUTATOR_HOOKFUNCTION(gravity_StartFrame)
 
        gravity_delay = time + autocvar_g_random_gravity_delay;
 
-       dprint("Gravity is now: ", ftos(autocvar_sv_gravity), "\n");
+       LOG_TRACE("Gravity is now: ", ftos(autocvar_sv_gravity), "\n");
 
        return false;
 }
index bc8600fb49ff34798af910ed25a9134768a6f69f..bac05be86c039f96624efeb434f1544db53c3c4d 100644 (file)
@@ -48,7 +48,7 @@ void superspec_save_client_conf()
        fh = fopen(fn, FILE_WRITE);
        if(fh < 0)
        {
-               dprint("^1ERROR: ^7 superspec can not open ", fn, " for writing.\n");
+               LOG_TRACE("^1ERROR: ^7 superspec can not open ", fn, " for writing.\n");
        }
        else
        {
@@ -465,14 +465,14 @@ MUTATOR_HOOKFUNCTION(superspec_ClientConnect)
        fh = fopen(fn, FILE_READ);
        if(fh < 0)
        {
-               dprint("^1ERROR: ^7 superspec can not open ", fn, " for reading.\n");
+               LOG_TRACE("^1ERROR: ^7 superspec can not open ", fn, " for reading.\n");
        }
        else
        {
                string _magic = fgets(fh);
                if(_magic != _SSMAGIX)
                {
-                       dprint("^1ERROR^7 While reading superspec options file: unknown magic\n");
+                       LOG_TRACE("^1ERROR^7 While reading superspec options file: unknown magic\n");
                }
                else
                {
index 2d9ab47c00ab9580161ced097bc3ff08bcf5684e..6e11abcd20ee436c5fb215504ae965f56f94aa77 100644 (file)
@@ -393,7 +393,7 @@ void sandbox_Database_Load()
        if(file_get < 0)
        {
                if(autocvar_g_sandbox_info > 0)
-                       print(strcat("^3SANDBOX - SERVER: ^7could not find storage file ^3", file_name, "^7, no objects were loaded\n"));
+                       LOG_INFO(strcat("^3SANDBOX - SERVER: ^7could not find storage file ^3", file_name, "^7, no objects were loaded\n"));
        }
        else
        {
@@ -418,7 +418,7 @@ void sandbox_Database_Load()
                        }
                }
                if(autocvar_g_sandbox_info > 0)
-                       print(strcat("^3SANDBOX - SERVER: ^7successfully loaded storage file ^3", file_name, "\n"));
+                       LOG_INFO(strcat("^3SANDBOX - SERVER: ^7successfully loaded storage file ^3", file_name, "\n"));
        }
        fclose(file_get);
 }
@@ -505,7 +505,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                setmodel(e, argv(2));
 
                                if(autocvar_g_sandbox_info > 0)
-                                       print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " spawned an object at origin ^3", vtos(e.origin), "\n"));
+                                       LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " spawned an object at origin ^3", vtos(e.origin), "\n"));
                                return true;
 
                        // ---------------- COMMAND: OBJECT, REMOVE ----------------
@@ -514,7 +514,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                if(e != world)
                                {
                                        if(autocvar_g_sandbox_info > 0)
-                                               print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " removed an object at origin ^3", vtos(e.origin), "\n"));
+                                               LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " removed an object at origin ^3", vtos(e.origin), "\n"));
                                        sandbox_ObjectRemove(e);
                                        return true;
                                }
@@ -563,7 +563,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
 
                                                print_to(self, "^2SANDBOX - INFO: ^7Object pasted successfully");
                                                if(autocvar_g_sandbox_info > 0)
-                                                       print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " pasted an object at origin ^3", vtos(e.origin), "\n"));
+                                                       LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " pasted an object at origin ^3", vtos(e.origin), "\n"));
                                                return true;
                                }
                                return true;
@@ -598,7 +598,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                                        self.object_attach = world; // object was attached, no longer keep it scheduled for attachment
                                                        print_to(self, "^2SANDBOX - INFO: ^7Object attached successfully");
                                                        if(autocvar_g_sandbox_info > 1)
-                                                               print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " attached objects at origin ^3", vtos(e.origin), "\n"));
+                                                               LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " attached objects at origin ^3", vtos(e.origin), "\n"));
                                                        return true;
                                                }
                                                print_to(self, "^1SANDBOX - WARNING: ^7Object could not be attached to the parent. Make sure you are facing an object that you have edit rights over");
@@ -611,7 +611,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                                        sandbox_ObjectAttach_Remove(e);
                                                        print_to(self, "^2SANDBOX - INFO: ^7Child objects detached successfully");
                                                        if(autocvar_g_sandbox_info > 1)
-                                                               print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " detached objects at origin ^3", vtos(e.origin), "\n"));
+                                                               LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " detached objects at origin ^3", vtos(e.origin), "\n"));
                                                        return true;
                                                }
                                                print_to(self, "^1SANDBOX - WARNING: ^7Child objects could not be detached. Make sure you are facing an object that you have edit rights over");
@@ -702,7 +702,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                        e.message2 = strzone(strftime(true, "%d-%m-%Y %H:%M:%S"));
 
                                        if(autocvar_g_sandbox_info > 1)
-                                               print(strcat("^3SANDBOX - SERVER: ^7", self.netname, " edited property ^3", argv(2), " ^7of an object at origin ^3", vtos(e.origin), "\n"));
+                                               LOG_INFO(strcat("^3SANDBOX - SERVER: ^7", self.netname, " edited property ^3", argv(2), " ^7of an object at origin ^3", vtos(e.origin), "\n"));
                                        return true;
                                }
 
index 40e23387d28175249f715e7d7b96d3ba6375f7f6..a563a02c1e1897af218e1ac4f42acb80493b7dea 100644 (file)
@@ -634,7 +634,7 @@ void pathlib_close_node(entity node,vector goal)
 
     if(node.owner == closedlist)
     {
-        dprint("Pathlib: Tried to close a closed node!\n");
+        LOG_TRACE("Pathlib: Tried to close a closed node!\n");
         return;
     }
 
@@ -867,12 +867,12 @@ entity pathlib_astar(vector from,vector to)
     to.x = fsnap(to.x,pathlib_gridsize);
     to.y = fsnap(to.y,pathlib_gridsize);
 
-    dprint("AStar init. ", ftos(pathlib_scraplist_cnt), " nodes on scrap\n");
+    LOG_TRACE("AStar init. ", ftos(pathlib_scraplist_cnt), " nodes on scrap\n");
     path = pathlib_mknode(from,world);
     pathlib_close_node(path,to);
     if(pathlib_foundgoal)
     {
-        dprint("AStar: Goal found on first node!\n");
+        LOG_TRACE("AStar: Goal found on first node!\n");
 
         open           = spawn();
         open.owner     = open;
@@ -886,7 +886,7 @@ entity pathlib_astar(vector from,vector to)
 
     if(pathlib_expandnode(path,from,to) <= 0)
     {
-        dprint("AStar path fail.\n");
+        LOG_TRACE("AStar path fail.\n");
         pathlib_cleanup();
 
         return world;
@@ -913,7 +913,7 @@ entity pathlib_astar(vector from,vector to)
 
         if(pathlib_foundgoal)
         {
-            dprint("Target found. Rebuilding and filtering path...\n");
+            LOG_TRACE("Target found. Rebuilding and filtering path...\n");
             ftime = gettime(GETTIME_REALTIME);
             ptime = ftime - ptime;
 
@@ -940,32 +940,32 @@ entity pathlib_astar(vector from,vector to)
 #ifdef DEBUGPATHING
             pathlib_showpath2(start);
 
-            dprint("Time used -      pathfinding: ", ftos(ptime),"\n");
-            dprint("Time used - rebuild & filter: ", ftos(ftime),"\n");
-            dprint("Time used -          cleanup: ", ftos(ctime),"\n");
-            dprint("Time used -            total: ", ftos(ptime + ftime + ctime),"\n");
-            dprint("Time used -         # frames: ", ftos(ceil((ptime + ftime + ctime) / sys_frametime)),"\n\n");
-            dprint("Nodes -         created: ", ftos(pathlib_made_cnt),"\n");
-            dprint("Nodes -            open: ", ftos(pathlib_open_cnt),"\n");
-            dprint("Nodes -          merged: ", ftos(pathlib_merge_cnt),"\n");
-            dprint("Nodes -          closed: ", ftos(pathlib_closed_cnt),"\n");
-            dprint("Nodes -        searched: ", ftos(pathlib_searched_cnt),"\n");
+            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");
 
         if(pathlib_recycle_cnt)
-            dprint("Nodes -      make/reuse: ", ftos(pathlib_made_cnt / pathlib_recycle_cnt),"\n");
+            LOG_TRACE("Nodes -      make/reuse: ", ftos(pathlib_made_cnt / pathlib_recycle_cnt),"\n");
         if(pathlib_recycle_cnt)
-            dprint("Nodes -          reused: ", ftos(pathlib_recycle_cnt),"\n");
+            LOG_TRACE("Nodes -          reused: ", ftos(pathlib_recycle_cnt),"\n");
 
-            dprint("Nodes bestopen searched: ", ftos(pathlib_bestopen_seached),"\n");
-            dprint("Nodes bestcash -   hits: ", ftos(pathlib_bestcash_hits),"\n");
-            dprint("Nodes bestcash -   save: ", ftos(pathlib_bestcash_saved),"\n");
-            dprint("AStar done. ", ftos(pathlib_scraplist_cnt), " nodes on scrap\n\n");
+            LOG_TRACE("Nodes bestopen searched: ", ftos(pathlib_bestopen_seached),"\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. ", ftos(pathlib_scraplist_cnt), " nodes on scrap\n\n");
 #endif
             return start;
         }
     }
 
-    dprint("A* Faild to find a path! Try a smaller gridsize.\n");
+    LOG_TRACE("A* Faild to find a path! Try a smaller gridsize.\n");
 
     pathlib_cleanup();
 
index 9d49be9ecea3c9a5eb8a5cb75188d56bdfc6ee5a..1f095a7856a1f8ff8304004016b9e9c73ac4dfdb 100644 (file)
@@ -105,7 +105,7 @@ float pathlib_expandnode_star(entity node, vector start, vector goal)
 
     if(node.pathlib_node_edgeflags == pathlib_node_edgeflag_none)
     {
-        dprint("Node at ", vtos(node.origin), " not expanable");
+        LOG_TRACE("Node at ", vtos(node.origin), " not expanable");
         return pathlib_open_cnt;
     }
 
index cf000801a855afd15481a24ce1480aa77a7521e4..39847f635d220661cf60c9caa56f57f87b06169f 100644 (file)
@@ -71,7 +71,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
 
     if(inwater(parent.origin))
     {
-        dprint("FromWater\n");
+        LOG_TRACE("FromWater\n");
         pathlib_expandnode = pathlib_expandnode_box;
         pathlib_movenode   = pathlib_swimnode;
     }
@@ -79,13 +79,13 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
     {
         if(inwater(to))
         {
-            dprint("ToWater\n");
+            LOG_TRACE("ToWater\n");
             pathlib_expandnode = pathlib_expandnode_box;
             pathlib_movenode   = pathlib_walknode;
         }
         else
         {
-            dprint("LandToLoand\n");
+            LOG_TRACE("LandToLoand\n");
             //if(edge_check(parent.origin))
             //    return 0;
 
@@ -98,7 +98,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
     node = pathlib_nodeatpoint(to);
     if(node)
     {
-        dprint("NodeAtPoint\n");
+        LOG_TRACE("NodeAtPoint\n");
         ++pathlib_merge_cnt;
 
         if(node.owner == openlist)
@@ -131,7 +131,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
     {
         //pathlib_showsquare(where, 0 ,30);
         //pathlib_showsquare(parent.origin, 1 ,30);
-        dprint("pathlib_movenode_goodnode = 0\n");
+        LOG_TRACE("pathlib_movenode_goodnode = 0\n");
         return 0;
     }
 
@@ -139,9 +139,9 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
 
     if(pathlib_nodeatpoint(where))
     {
-        dprint("NAP WHERE :",vtos(where),"\n");
-        dprint("not NAP TO:",vtos(to),"\n");
-        dprint("NAP-NNAP:",ftos(vlen(to-where)),"\n\n");
+        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");
         return 0;
     }
 
@@ -149,7 +149,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go
     if(doedge)
         if (!tile_check(where))
         {
-            dprint("tile_check fail\n");
+            LOG_TRACE("tile_check fail\n");
             pathlib_showsquare(where, 0 ,30);
             return 0;
         }
@@ -241,7 +241,7 @@ void pathlib_close_node(entity node,vector goal)
 
     if(node.owner == closedlist)
     {
-        dprint("Pathlib: Tried to close a closed node!\n");
+        LOG_TRACE("Pathlib: Tried to close a closed node!\n");
         return;
     }
 
@@ -457,12 +457,12 @@ entity pathlib_astar(vector from,vector to)
     to.y = fsnap(to.y, pathlib_gridsize);
     //to_z += 32;
 
-    dprint("AStar init\n");
+    LOG_TRACE("AStar init\n");
     path = pathlib_mknode(from, world);
     pathlib_close_node(path, to);
     if(pathlib_foundgoal)
     {
-        dprint("AStar: Goal found on first node!\n");
+        LOG_TRACE("AStar: Goal found on first node!\n");
 
         open           = spawn();
         open.owner     = open;
@@ -476,7 +476,7 @@ entity pathlib_astar(vector from,vector to)
 
     if(pathlib_expandnode(path, from, to) <= 0)
     {
-        dprint("AStar path fail.\n");
+        LOG_TRACE("AStar path fail.\n");
         pathlib_cleanup();
 
         return world;
@@ -494,11 +494,11 @@ entity pathlib_astar(vector from,vector to)
     {
         if((gettime(GETTIME_REALTIME) - pathlib_starttime) > pathlib_maxtime)
         {
-            dprint("Path took to long to compute!\n");
-            dprint("Nodes - created: ", ftos(pathlib_made_cnt),"\n");
-            dprint("Nodes -    open: ", ftos(pathlib_open_cnt),"\n");
-            dprint("Nodes -  merged: ", ftos(pathlib_merge_cnt),"\n");
-            dprint("Nodes -  closed: ", ftos(pathlib_closed_cnt),"\n");
+            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");
 
             pathlib_cleanup();
             return world;
@@ -515,7 +515,7 @@ entity pathlib_astar(vector from,vector to)
 
         if(pathlib_foundgoal)
         {
-            dprint("Target found. Rebuilding and filtering path...\n");
+            LOG_TRACE("Target found. Rebuilding and filtering path...\n");
             ftime = gettime(GETTIME_REALTIME);
             ptime = ftime - ptime;
 
@@ -542,26 +542,26 @@ entity pathlib_astar(vector from,vector to)
 #ifdef DEBUGPATHING
             pathlib_showpath2(start);
 
-            dprint("Time used -      pathfinding: ", ftos(ptime),"\n");
-            dprint("Time used - rebuild & filter: ", ftos(ftime),"\n");
-            dprint("Time used -          cleanup: ", ftos(ctime),"\n");
-            dprint("Time used -            total: ", ftos(ptime + ftime + ctime),"\n");
-            dprint("Time used -         # frames: ", ftos(ceil((ptime + ftime + ctime) / sys_frametime)),"\n\n");
-            dprint("Nodes -         created: ", ftos(pathlib_made_cnt),"\n");
-            dprint("Nodes -            open: ", ftos(pathlib_open_cnt),"\n");
-            dprint("Nodes -          merged: ", ftos(pathlib_merge_cnt),"\n");
-            dprint("Nodes -          closed: ", ftos(pathlib_closed_cnt),"\n");
-            dprint("Nodes -        searched: ", ftos(pathlib_searched_cnt),"\n");
-            dprint("Nodes bestopen searched: ", ftos(pathlib_bestopen_seached),"\n");
-            dprint("Nodes bestcash -   hits: ", ftos(pathlib_bestcash_hits),"\n");
-            dprint("Nodes bestcash -   save: ", ftos(pathlib_bestcash_saved),"\n");
-            dprint("AStar done.\n");
+            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_seached),"\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");
 #endif
             return start;
         }
     }
 
-    dprint("A* Faild to find a path! Try a smaller gridsize.\n");
+    LOG_TRACE("A* Faild to find a path! Try a smaller gridsize.\n");
 
     pathlib_cleanup();
 
index f1e596d798dab61eaabca0f54309209a499b181a..8720eca8b7fdf4198ffededf425784cce73de41e 100644 (file)
@@ -85,7 +85,7 @@ vector pathlib_walknode(vector start,vector end,float doedge)
     vector direction,point,last_point,s,e;
     float steps, distance, i;
 
-    dprint("Walking node from ", vtos(start), " to ", vtos(end), "\n");
+    LOG_TRACE("Walking node from ", vtos(start), " to ", vtos(end), "\n");
 
     pathlib_movenode_goodnode = 0;
 
@@ -107,7 +107,7 @@ vector pathlib_walknode(vector start,vector end,float doedge)
         //start - movenode_maxdrop
         a.cnt = time + 10;
 
-        dprint("I cant walk on air!\n");
+        LOG_TRACE("I cant walk on air!\n");
         return trace_endpos;
     }
 
index 1bc115dc0e49323e033963aa227c9ed4402635bc..7dee3e80f6154d6980061635f280b50b34c2dcf4 100644 (file)
@@ -163,7 +163,7 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback)
     pathlib_searched_cnt     = 0;
     pathlib_foundgoal      = false;
 
-    dprint("pathlib_waypointpath init\n");
+    LOG_TRACE("pathlib_waypointpath init\n");
 
     // Initialize waypoint grid
     // FIXME! presisted chain for better preformance
@@ -185,10 +185,10 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback)
     start_node = wp_from;
 
     start_node.pathlib_list = closedlist;
-    dprint("Expanding ",ftos(pathlib_wpp_expand(start_node))," links\n");
+    LOG_TRACE("Expanding ",ftos(pathlib_wpp_expand(start_node))," links\n");
     if(pathlib_open_cnt <= 0)
     {
-        dprint("pathlib_waypointpath: Start waypoint not linked! aborting.\n");
+        LOG_TRACE("pathlib_waypointpath: Start waypoint not linked! aborting.\n");
         return world;
     }
 
@@ -202,17 +202,17 @@ entity pathlib_waypointpath_step()
     n = pathlib_wpp_bestopen();
     if(!n)
     {
-        dprint("Cannot find best open node, abort.\n");
+        LOG_TRACE("Cannot find best open node, abort.\n");
         return world;
     }
     pathlib_wpp_close(n);
-       dprint("Expanding ",ftos(pathlib_wpp_expand(n))," links\n");
+       LOG_TRACE("Expanding ",ftos(pathlib_wpp_expand(n))," links\n");
 
     if(pathlib_foundgoal)
     {
         entity start, end, open, ln;
 
-        dprint("Target found. Rebuilding and filtering path...\n");
+        LOG_TRACE("Target found. Rebuilding and filtering path...\n");
 
                buildpath_nodefilter = buildpath_nodefilter_none;
                start = path_build(world, start_node.origin, world, world);
index c2e812c2c10e6463e49ec2cee4185c23fce5d8b3..2450d5865108112767fc15caebd10e8dd9102c0a 100644 (file)
@@ -22,7 +22,7 @@ void playerdemo_shutdown()
 {
        if(self.playerdemo_mode != PLAYERDEMO_MODE_OFF)
        {
-               print("playerdemo: ", self.netname, " closed\n");
+               LOG_INFO("playerdemo: ", self.netname, " closed\n");
                fclose(self.playerdemo_fh);
        }
        self.playerdemo_mode = 0;
@@ -36,7 +36,7 @@ void playerdemo_open_read(string f)
        self.playerdemo_time = stof(fgets(self.playerdemo_fh));
        self.playerdemo_time += self.playerdemo_starttime;
        self.movetype = MOVETYPE_NONE;
-       print("playerdemo: ", self.netname, " reading from ", f, "\n");
+       LOG_INFO("playerdemo: ", self.netname, " reading from ", f, "\n");
 }
 void playerdemo_open_write(string f)
 {
@@ -44,8 +44,8 @@ void playerdemo_open_write(string f)
        self.playerdemo_mode = PLAYERDEMO_MODE_WRITING;
        self.playerdemo_fh = fopen(f, FILE_WRITE);
        self.playerdemo_starttime = time - 1;
-       print("playerdemo: ", self.netname, " writing to ", f, "\n");
-       print("WARNING: playerdemo file format is incomplete and not stable yet. DO NOT RELY ON IT!\n");
+       LOG_INFO("playerdemo: ", self.netname, " writing to ", f, "\n");
+       LOG_INFO("WARNING: playerdemo file format is incomplete and not stable yet. DO NOT RELY ON IT!\n");
 }
 #define PLAYERDEMO_FIELD(func,t,f) func##t(f,#f);
 #define PLAYERDEMO_FIELDS(func) \
index b79b28285dc9e2839be9d713b623429be35db94a..7bb6332b07d381f1725d9e9e808dfd2a53b94e6b 100644 (file)
@@ -146,7 +146,7 @@ float Portal_TeleportPlayer(entity teleporter, entity player)
        tracebox(safe, player.mins - SAFENUDGE, player.maxs + SAFENUDGE, step, MOVE_NOMONSTERS, player);
        if(trace_startsolid)
        {
-               print("'safe' teleport location is not safe!\n");
+               LOG_INFO("'safe' teleport location is not safe!\n");
                // FAIL TODO why does this happen?
                return 0;
        }
@@ -154,7 +154,7 @@ float Portal_TeleportPlayer(entity teleporter, entity player)
        tracebox(safe, player.mins - SAFENUDGE, player.maxs + SAFENUDGE, to, MOVE_NOMONSTERS, player);
        if(trace_startsolid)
        {
-               print("trace_endpos in solid, this can't be!\n");
+               LOG_INFO("trace_endpos in solid, this can't be!\n");
                // FAIL TODO why does this happen? (reported by MrBougo)
                return 0;
        }
@@ -213,7 +213,7 @@ float Portal_FindSafeOrigin(entity portal)
        if(!move_out_of_solid(portal))
        {
 #ifdef DEBUG
-               print("NO SAFE ORIGIN\n");
+               LOG_INFO("NO SAFE ORIGIN\n");
 #endif
                return 0;
        }
index eab7017d1cb877ccc78e15c57c5849503f76fa55..bffb221a24287bd4671ca615b7a12d2cd69b68e8 100644 (file)
@@ -548,22 +548,22 @@ void dumpsurface(entity e)
 {
        float n, si, ni;
        vector norm, vec;
-       print("Surfaces of ", etos(e), ":\n");
+       LOG_INFO("Surfaces of ", etos(e), ":\n");
 
-       print("TEST = ", ftos(getsurfacenearpoint(e, '0 0 0')), "\n");
+       LOG_INFO("TEST = ", ftos(getsurfacenearpoint(e, '0 0 0')), "\n");
 
        for(si = 0; ; ++si)
        {
                n = getsurfacenumpoints(e, si);
                if(n <= 0)
                        break;
-               print("  Surface ", ftos(si), ":\n");
+               LOG_INFO("  Surface ", ftos(si), ":\n");
                norm = getsurfacenormal(e, si);
-               print("    Normal = ", vtos(norm), "\n");
+               LOG_INFO("    Normal = ", vtos(norm), "\n");
                for(ni = 0; ni < n; ++ni)
                {
                        vec = getsurfacepoint(e, si, ni);
-                       print("    Point ", ftos(ni), " = ", vtos(vec), " (", ftos(norm * vec), ")\n");
+                       LOG_INFO("    Point ", ftos(ni), " = ", vtos(vec), " (", ftos(norm * vec), ")\n");
                }
        }
 }
index bc191f74f46be02808a00148036e1e6ef5e92641..4cad8866422175099de63a63806d09764c0461c6 100644 (file)
@@ -53,7 +53,7 @@ void spawnpoint_use()
                self.team = activator.team;
                some_spawn_has_been_used = 1;
        }
-       print("spawnpoint was used!\n");
+       LOG_INFO("spawnpoint was used!\n");
 }
 
 void relocate_spawnpoint()
@@ -70,14 +70,14 @@ void relocate_spawnpoint()
         self.maxs = PL_MAX_CONST;
         if (!move_out_of_solid(self))
             objerror("could not get out of solid at all!");
-        print("^1NOTE: this map needs FIXING. Spawnpoint at ", vtos(o - '0 0 1'));
-        print(" needs to be moved out of solid, e.g. by '", ftos(self.origin.x - o.x));
-        print(" ", ftos(self.origin.y - o.y));
-        print(" ", ftos(self.origin.z - o.z), "'\n");
+        LOG_INFO("^1NOTE: this map needs FIXING. Spawnpoint at ", vtos(o - '0 0 1'));
+        LOG_INFO(" needs to be moved out of solid, e.g. by '", ftos(self.origin.x - o.x));
+        LOG_INFO(" ", ftos(self.origin.y - o.y));
+        LOG_INFO(" ", ftos(self.origin.z - o.z), "'\n");
         if (autocvar_g_spawnpoints_auto_move_out_of_solid)
         {
             if (!spawnpoint_nag)
-                print("\{1}^1NOTE: this map needs FIXING (it contains spawnpoints in solid, see server log)\n");
+                LOG_INFO("\{1}^1NOTE: this map needs FIXING (it contains spawnpoints in solid, see server log)\n");
             spawnpoint_nag = 1;
         }
         else
@@ -223,7 +223,7 @@ vector Spawn_Score(entity spot, float mindist, float teamcheck)
 
                if(!found)
                {
-                       dprint("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, "\n");
                        return '-1 0 0';
                }
        }
index 18ea24d9498327546a90c07eb83f3ca182cc4f2d..1f629af5cfe06eb0e5815127c9d8bd75fb6d3c78 100644 (file)
@@ -200,7 +200,7 @@ void StartFrame (void)
                float t, pp, c_seeing, c_seen;
                entity cl;
                t = client_cefc_accumulator / (time - client_cefc_accumulatortime);
-               print("CEFC time: ", ftos(t * 1000), "ms; ");
+               LOG_INFO("CEFC time: ", ftos(t * 1000), "ms; ");
                c_seeing = 0;
                c_seen = 0;
                FOR_EACH_CLIENT(cl)
@@ -210,8 +210,8 @@ void StartFrame (void)
                        if(IS_PLAYER(cl))
                                ++c_seen;
                }
-               print("CEFC calls per second: ", ftos(c_seeing * (c_seen - 1) / t), "; ");
-               print("CEFC 100% load at: ", ftos(solve_quadratic(t, -t, -1) * '0 1 0'), "\n");
+               LOG_INFO("CEFC calls per second: ", ftos(c_seeing * (c_seen - 1) / t), "; ");
+               LOG_INFO("CEFC 100% load at: ", ftos(solve_quadratic(t, -t, -1) * '0 1 0'), "\n");
 
                client_cefc_accumulatortime = time;
                client_cefc_accumulator = 0;
index fa25ea7ec0e9fe88336d1068b181c58e80fd506a..f883fd9e683be03549b957c57411a16e817fd6ff 100644 (file)
@@ -177,7 +177,7 @@ void ItemRead(float _IsNew)
             else
             {
                 self.draw = ItemDraw;
-                dprint("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\n");
             }
         }
 
@@ -186,7 +186,7 @@ void ItemRead(float _IsNew)
 
 
         if(self.mdl == "")
-            dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, " tell tZork aboute this!\n");
+            LOG_TRACE("^1WARNING!^7 self.mdl is unset for item ", self.classname, " tell tZork aboute this!\n");
 
         precache_model(self.mdl);
         setmodel(self, self.mdl);
@@ -270,7 +270,7 @@ bool ItemSend(entity to, int sf)
     {
 
         if(self.mdl == "")
-            dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, "exspect a crash just aboute now\n");
+            LOG_TRACE("^1WARNING!^7 self.mdl is unset for item ", self.classname, "exspect a crash just aboute now\n");
 
         WriteString(MSG_ENTITY, self.mdl);
     }
@@ -785,7 +785,7 @@ void Item_FindTeam()
        if(self.effects & EF_NODRAW)
        {
                // marker for item team search
-               dprint("Initializing item team ", ftos(self.team), "\n");
+               LOG_TRACE("Initializing item team ", ftos(self.team), "\n");
                RandomSelection_Init();
                for(head = world; (head = findfloat(head, team, self.team)); ) if(head.flags & FL_ITEM)
                        RandomSelection_Add(head, 0, string_null, head.cnt, 0);
@@ -1075,8 +1075,8 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
                            // why not flags & fl_item?
                                if(otheritem.is_item)
                                {
-                                       dprint("XXX Found duplicated item: ", itemname, vtos(self.origin));
-                                       dprint(" vs ", otheritem.netname, vtos(otheritem.origin), "\n");
+                                       LOG_TRACE("XXX Found duplicated item: ", itemname, vtos(self.origin));
+                                       LOG_TRACE(" vs ", otheritem.netname, vtos(otheritem.origin), "\n");
                                        error("Mapper sucks.");
                                }
                        }
@@ -1421,7 +1421,7 @@ void spawnfunc_target_items (void)
                                        }
                                }
                                if(j > WEP_LAST)
-                                       print("target_items: invalid item ", argv(i), "\n");
+                                       LOG_INFO("target_items: invalid item ", argv(i), "\n");
                        }
                }
 
@@ -1781,7 +1781,7 @@ float GiveItems(entity e, float beginarg, float endarg)
                                        }
                                }
                                if(j > WEP_LAST)
-                                       print("give: invalid item ", cmd, "\n");
+                                       LOG_INFO("give: invalid item ", cmd, "\n");
                                break;
                }
                val = 999;
index 41354bf8a1f7a14b823ce476cde8c17cfce71746..ab25dbfbb0aba424033257de7664ba6e6b25ecb7 100644 (file)
@@ -1387,10 +1387,10 @@ void LinkDoors()
        FindConnectedComponent(self, enemy, LinkDoors_nextent, LinkDoors_isconnected, world);
 
        // set owner, and make a loop of the chain
-       dprint("LinkDoors: linking doors:");
+       LOG_TRACE("LinkDoors: linking doors:");
        for(t = self; ; t = t.enemy)
        {
-               dprint(" ", etos(t));
+               LOG_TRACE(" ", etos(t));
                t.owner = self;
                if(t.enemy == world)
                {
@@ -1398,7 +1398,7 @@ void LinkDoors()
                        break;
                }
        }
-       dprint("\n");
+       LOG_TRACE("\n");
 
        // collect health, targetname, message, size
        cmins = self.absmin;
index f75df5e38a6a6fe3daa1e53c2a964402292f07eb..48496c31a1875bf8c7c1d583a519cb4e7a116ed6 100644 (file)
@@ -64,7 +64,7 @@ void InitGameplayMode()
 
        if (!cvar_value_issafe(world.fog))
        {
-               print("The current map contains a potentially harmful fog setting, ignored\n");
+               LOG_INFO("The current map contains a potentially harmful fog setting, ignored\n");
                world.fog = string_null;
        }
        if(MapInfo_Map_fog != "")
index 8e7810bbb117de338ed62dc6a32e6684466e8f1e..3c3c9d80695fde47bfb984a548919eb643cc19d2 100644 (file)
@@ -85,7 +85,7 @@ void weapon_defaultspawnfunc(float wpn)
                                }
                                if(j > WEP_LAST)
                                {
-                                       print("The weapon replace list for ", oldself.classname, " contains an unknown weapon ", s, ". Skipped.\n");
+                                       LOG_INFO("The weapon replace list for ", oldself.classname, " contains an unknown weapon ", s, ". Skipped.\n");
                                }
                        }
                        self = oldself;
@@ -105,7 +105,7 @@ void weapon_defaultspawnfunc(float wpn)
                        }
                        if(j > WEP_LAST)
                        {
-                               print("The weapon replace list for ", self.classname, " contains an unknown weapon ", s, ". Skipped.\n");
+                               LOG_INFO("The weapon replace list for ", self.classname, " contains an unknown weapon ", s, ". Skipped.\n");
                        }
                }
                if(wpn == 0)
index 484ac35be48ae6a459dfd59827175c29cd00437c..52eea36f9e3644e992e079b40bdcfc673ea4049e 100644 (file)
@@ -118,7 +118,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
                                        if (trace_ent == ent.cursor_trace_ent)
                                                w_shotdir = normalize(ent.cursor_trace_ent.origin - w_shotorg);
                                        else
-                                               print("antilag fail\n");
+                                               LOG_INFO("antilag fail\n");
                                }
                        }
                }
@@ -182,7 +182,7 @@ void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float p
        #if 0
        mspercallsum += gettime(GETTIME_HIRES);
        mspercallcount += 1;
-       print("avg: ", ftos(mspercallcount / mspercallsum), " per sec\n");
+       LOG_INFO("avg: ", ftos(mspercallcount / mspercallsum), " per sec\n");
        #endif
 
        proj.velocity = W_CalculateProjectileVelocity(proj.owner.velocity, pSpeed * dir, forceAbsolute);
index 09d2770467ea849161dd42a43488cfed1a06130a..6701f5829a25839ba5e353d7deaaaee12cae8aa2 100644 (file)
@@ -48,21 +48,21 @@ void WeaponStats_ready(entity fh, entity pass, float status)
                case URL_READY_CANREAD:
                        // url_fclose is processing, we got a response for writing the data
                        // this must come from HTTP
-                       print("Got response from weapon stats server:\n");
+                       LOG_INFO("Got response from weapon stats server:\n");
                        while((s = url_fgets(fh)))
-                               print("  ", s, "\n");
-                       print("End of response.\n");
+                               LOG_INFO("  ", s, "\n");
+                       LOG_INFO("End of response.\n");
                        url_fclose(fh);
                        break;
                case URL_READY_CLOSED:
                        // url_fclose has finished
-                       print("Weapon stats written\n");
+                       LOG_INFO("Weapon stats written\n");
                        buf_del(weaponstats_buffer);
                        weaponstats_buffer = -1;
                        break;
                case URL_READY_ERROR:
                default:
-                       print("Weapon stats writing failed: ", ftos(status), "\n");
+                       LOG_INFO("Weapon stats writing failed: ", ftos(status), "\n");
                        buf_del(weaponstats_buffer);
                        weaponstats_buffer = -1;
                        break;
index 17781e6d4c955e475af42d57bc8585ff8b496740..f53e3c53d09119c21b6c5542d640197dc9cf0b37 100644 (file)
@@ -172,7 +172,7 @@ void CL_WeaponEntity_SetModel(string name)
                                self.movedir = gettaginfo(self, idx);
                        else
                        {
-                               print("WARNING: weapon model ", self.model, " does not support the 'shot' tag, will display shots TOTALLY wrong\n");
+                               LOG_INFO("WARNING: weapon model ", self.model, " does not support the 'shot' tag, will display shots TOTALLY wrong\n");
                                self.movedir = '0 0 0';
                        }
                }
@@ -196,7 +196,7 @@ void CL_WeaponEntity_SetModel(string name)
                                self.spawnorigin = gettaginfo(self, idx);
                        else
                        {
-                               print("WARNING: weapon model ", self.model, " does not support the 'shell' tag, will display casings wrong\n");
+                               LOG_INFO("WARNING: weapon model ", self.model, " does not support the 'shell' tag, will display casings wrong\n");
                                self.spawnorigin = self.movedir;
                        }
                }
@@ -225,7 +225,7 @@ void CL_WeaponEntity_SetModel(string name)
                        }
                        else
                        {
-                               print("WARNING: weapon model ", self.model, " does not support the 'handle' tag and neither does the v_ model support the 'shot' tag, will display muzzle flashes TOTALLY wrong\n");
+                               LOG_INFO("WARNING: weapon model ", self.model, " does not support the 'handle' tag and neither does the v_ model support the 'shot' tag, will display muzzle flashes TOTALLY wrong\n");
                                self.oldorigin = '0 0 0'; // there is no way to recover from this
                        }
                }
@@ -916,7 +916,7 @@ void W_Reload(float sent_ammo_min, string sent_sound)
        // don't reload weapons that don't have the RELOADABLE flag
        if (!(e.spawnflags & WEP_FLAG_RELOADABLE))
        {
-               dprint("Warning: Attempted to reload a weapon that does not have the WEP_FLAG_RELOADABLE flag. Fix your code!\n");
+               LOG_TRACE("Warning: Attempted to reload a weapon that does not have the WEP_FLAG_RELOADABLE flag. Fix your code!\n");
                return;
        }
 
index 706acde4448aef1d6bad8eb039570cbecabc6129..d04b768f8810e8b3b5d2b431b54ba135cafc0fe8 100644 (file)
@@ -116,7 +116,7 @@ float WarpZoneLib_BoxTouchesBrush_Recurse()
 #ifdef CSQC
        if (trace_networkentity)
        {
-               dprint("hit a network ent, cannot continue WarpZoneLib_BoxTouchesBrush\n");
+               LOG_TRACE("hit a network ent, cannot continue WarpZoneLib_BoxTouchesBrush\n");
                // we cannot continue, as a player blocks us...
                // so, abort
                return 0;
@@ -276,7 +276,7 @@ void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end,
        {
                if(--i < 1)
                {
-                       dprint("Too many warpzones in sequence, aborting trace.\n");
+                       LOG_TRACE("Too many warpzones in sequence, aborting trace.\n");
                        trace_ent = world;
                        break;
                }
@@ -304,7 +304,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?
-                       dprint("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\n");
                        trace_ent = world;
                        break;
                }
@@ -399,7 +399,7 @@ void WarpZone_TraceToss_ThroughZone(entity e, entity forent, entity zone, WarpZo
        {
                if(--i < 1)
                {
-                       dprint("Too many warpzones in sequence, aborting trace.\n");
+                       LOG_TRACE("Too many warpzones in sequence, aborting trace.\n");
                        trace_ent = world;
                        break;
                }
@@ -417,7 +417,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?
-                       dprint("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\n");
                        trace_ent = world;
                        break;
                }
index f3dd22ad31639328c1550f5ac70ebe5287e16870..b5c6f656a44e1410514f83da79f19aa5ce23a082 100644 (file)
@@ -112,7 +112,7 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1)
                }
                else
                {
-                       print("would have to put player in solid, won't do that\n");
+                       LOG_INFO("would have to put player in solid, won't do that\n");
                        setorigin(player, o0 - player.view_ofs);
                        return 0;
                }
@@ -216,7 +216,7 @@ void WarpZone_Touch (void)
        }
        else
        {
-               dprint("WARPZONE FAIL AHAHAHAHAH))\n");
+               LOG_TRACE("WARPZONE FAIL AHAHAHAHAH))\n");
        }
 }
 
@@ -338,13 +338,13 @@ float WarpZone_CheckProjectileImpact(entity player)
                return 0;
 
 #ifdef WARPZONELIB_REMOVEHACK
-       print("impactfilter found something - and it no longer gets handled correctly - please tell divVerent whether anything behaves broken now\n");
+       LOG_INFO("impactfilter found something - and it no longer gets handled correctly - please tell divVerent whether anything behaves broken now\n");
 #else
-       print("impactfilter found something - and it even gets handled correctly - please tell divVerent that this code apparently gets triggered again\n");
+       LOG_INFO("impactfilter found something - and it even gets handled correctly - please tell divVerent that this code apparently gets triggered again\n");
 #endif
-       print("Entity type: ", player.classname, "\n");
-       print("Origin: ", vtos(player.origin), "\n");
-       print("Velocity: ", vtos(player.velocity), "\n");
+       LOG_INFO("Entity type: ", player.classname, "\n");
+       LOG_INFO("Origin: ", vtos(player.origin), "\n");
+       LOG_INFO("Velocity: ", vtos(player.velocity), "\n");
 
 #ifdef WARPZONELIB_REMOVEHACK
        return 0;
@@ -577,7 +577,7 @@ void WarpZone_InitStep_UpdateTransform()
                point = point * (1 / (3 * area));
                if(vlen(norm) < 0.99)
                {
-                       print("trigger_warpzone near ", vtos(self.aiment.origin), " is nonplanar. BEWARE.\n");
+                       LOG_INFO("trigger_warpzone near ", vtos(self.aiment.origin), " is nonplanar. BEWARE.\n");
                        area = 0; // no autofixing in this case
                }
                norm = normalize(norm);
@@ -594,15 +594,15 @@ void WarpZone_InitStep_UpdateTransform()
                        makevectors(ang);
                        if(norm * v_forward < 0)
                        {
-                               print("Position target of trigger_warpzone near ", vtos(self.aiment.origin), " points into trigger_warpzone. BEWARE.\n");
+                               LOG_INFO("Position target of trigger_warpzone near ", vtos(self.aiment.origin), " points into trigger_warpzone. BEWARE.\n");
                                norm = -1 * norm;
                        }
                        ang = vectoangles2(norm, v_up); // keep rotation, but turn exactly against plane
                        ang.x = -ang.x;
                        if(norm * v_forward < 0.99)
-                               print("trigger_warpzone near ", vtos(self.aiment.origin), " has been turned to match plane orientation (", vtos(self.aiment.angles), " -> ", vtos(ang), "\n");
+                               LOG_INFO("trigger_warpzone near ", vtos(self.aiment.origin), " has been turned to match plane orientation (", vtos(self.aiment.angles), " -> ", vtos(ang), "\n");
                        if(vlen(org - self.aiment.origin) > 0.5)
-                               print("trigger_warpzone near ", vtos(self.aiment.origin), " has been moved to match the plane (", vtos(self.aiment.origin), " -> ", vtos(org), ").\n");
+                               LOG_INFO("trigger_warpzone near ", vtos(self.aiment.origin), " has been moved to match the plane (", vtos(self.aiment.origin), " -> ", vtos(org), ").\n");
                }
        }
        else if(area > 0)