Add the most obvious __VA_ARGS__ macro of all.
authorRudolf Polzer <divverent@xonotic.org>
Wed, 1 Jan 2014 09:47:38 +0000 (10:47 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 1 Jan 2014 09:47:38 +0000 (10:47 +0100)
40 files changed:
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/bgmscript.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/hud_config.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/movetypes.qc
qcsrc/client/player_skeleton.qc
qcsrc/client/scoreboard.qc
qcsrc/client/target_music.qc
qcsrc/client/tturrets.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/command/generic.qc
qcsrc/common/explosion_equation.qc
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/test.qc
qcsrc/common/urllib.qc
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/csqcmodellib/cl_player.qc
qcsrc/menu/item/label.c
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/serverlist.c
qcsrc/menu/xonotic/slider_decibels.c
qcsrc/menu/xonotic/util.qc
qcsrc/server/accuracy.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_tetris.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/w_tuba.qc
qcsrc/warpzonelib/client.qc

index f43f2da..23e8203 100644 (file)
@@ -53,7 +53,7 @@ void CSQC_Init(void)
        check_unacceptable_compiler_bugs();
 
 #ifdef WATERMARK
-       print(sprintf(_("^4CSQC Build information: ^1%s\n"), WATERMARK));
+       printf(_("^4CSQC Build information: ^1%s\n"), WATERMARK);
 #endif
 
        float i;
@@ -213,7 +213,7 @@ float SetTeam(entity o, float Team)
                        default:
                                if(GetTeam(Team, false) == world)
                                {
-                                       print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
+                                       printf(_("trying to switch to unsupported team %d\n"), Team);
                                        Team = NUM_SPECTATOR;
                                }
                                break;
@@ -229,7 +229,7 @@ float SetTeam(entity o, float Team)
                        default:
                                if(GetTeam(Team, false) == world)
                                {
-                                       print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
+                                       printf(_("trying to switch to unsupported team %d\n"), Team);
                                        Team = NUM_SPECTATOR;
                                }
                                break;
@@ -424,7 +424,7 @@ void Ent_ReadPlayerScore()
        if(!isNew && n != self.sv_entnum)
        {
                //print("A CSQC entity changed its owner!\n");
-               print(sprintf("A CSQC entity changed its owner! (edict: %d, classname: %s)\n", num_for_edict(self), self.classname));
+               printf("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;
@@ -687,7 +687,7 @@ void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
                }
        }
 
-       //print(sprintf("Ent_ReadSpawnPoint(is_new = %d); origin = %s, team = %d, effect = %d\n", is_new, vtos(self.origin), teamnum, self.cnt));
+       //printf("Ent_ReadSpawnPoint(is_new = %d); origin = %s, team = %d, effect = %d\n", is_new, vtos(self.origin), teamnum, self.cnt);
 }
 
 void Ent_ReadSpawnEvent(float is_new)
@@ -738,7 +738,7 @@ void Ent_ReadSpawnEvent(float is_new)
                }
        }
 
-       //print(sprintf("Ent_ReadSpawnEvent(is_new = %d); origin = %s, entnum = %d, localentnum = %d\n", is_new, vtos(self.origin), entnum, player_localentnum));
+       //printf("Ent_ReadSpawnEvent(is_new = %d); origin = %s, entnum = %d, localentnum = %d\n", is_new, vtos(self.origin), entnum, player_localentnum);
 }
 
 // CSQC_Ent_Update : Called every frame that the server has indicated an update to the SSQC / CSQC entity has occured.
@@ -753,7 +753,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
        t = ReadByte();
 
        if(autocvar_developer_csqcentities)
-               print(sprintf("CSQC_Ent_Update(%d) with self=%i self.entnum=%d self.enttype=%d t=%d\n", bIsNewEntity, self, self.entnum, self.enttype, t));
+               printf("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;
@@ -774,7 +774,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
                if(t != self.enttype || bIsNewEntity)
                {
                        //print("A CSQC entity changed its type!\n");
-                       print(sprintf("A CSQC entity changed its type! (edict: %d, server: %d, type: %d -> %d)\n", num_for_edict(self), self.entnum, self.enttype, t));
+                       printf("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;
@@ -784,7 +784,7 @@ void CSQC_Ent_Update(float bIsNewEntity)
        {
                if(!bIsNewEntity)
                {
-                       print(sprintf("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n", num_for_edict(self), self.entnum, t));
+                       printf("A CSQC entity appeared out of nowhere! (edict: %d, server: %d, type: %d)\n", num_for_edict(self), self.entnum, t);
                        bIsNewEntity = 1;
                }
        }
@@ -868,7 +868,7 @@ void Ent_Remove()
 void CSQC_Ent_Remove()
 {
        if(autocvar_developer_csqcentities)
-               print(sprintf("CSQC_Ent_Remove() with self=%i self.entnum=%d self.enttype=%d\n", self, self.entnum, self.enttype));
+               printf("CSQC_Ent_Remove() with self=%i self.entnum=%d self.enttype=%d\n", self, self.entnum, self.enttype);
 
        if(wasfreed(self))
        {
@@ -893,7 +893,7 @@ void Gamemode_Init()
 void CSQC_Parse_StuffCmd(string strMessage)
 {
        if(autocvar_developer_csqcentities)
-               print(sprintf("CSQC_Parse_StuffCmd(\"%s\")\n", strMessage));
+               printf("CSQC_Parse_StuffCmd(\"%s\")\n", strMessage);
 
        localcmd(strMessage);
 }
@@ -901,7 +901,7 @@ void CSQC_Parse_StuffCmd(string strMessage)
 void CSQC_Parse_Print(string strMessage)
 {
        if(autocvar_developer_csqcentities)
-               print(sprintf("CSQC_Parse_Print(\"%s\")\n", strMessage));
+               printf("CSQC_Parse_Print(\"%s\")\n", strMessage);
 
        print(ColorTranslateRGB(strMessage));
 }
@@ -910,7 +910,7 @@ void CSQC_Parse_Print(string strMessage)
 void CSQC_Parse_CenterPrint(string strMessage)
 {
        if(autocvar_developer_csqcentities)
-               print(sprintf("CSQC_Parse_CenterPrint(\"%s\")\n", strMessage));
+               printf("CSQC_Parse_CenterPrint(\"%s\")\n", strMessage);
 
        centerprint_hud(strMessage);
 }
@@ -1201,7 +1201,7 @@ float CSQC_Parse_TempEntity()
                nTEID = ReadByte();
 
        if(autocvar_developer_csqcentities)
-               print(sprintf("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID));
+               printf("CSQC_Parse_TempEntity() with nTEID=%d\n", nTEID);
 
                // NOTE: Could just do return instead of break...
        switch(nTEID)
index 493907a..edb5f9b 100644 (file)
@@ -606,12 +606,12 @@ void CSQC_UpdateView(float w, float h)
                setproperty(VF_ANGLES, '90 0 0');
 
                #if 0
-               print(sprintf("OrthoView: org = %s, angles = %s, distance = %f, nearest = %f, furthest = %f\n",
+               printf("OrthoView: org = %s, angles = %s, distance = %f, nearest = %f, furthest = %f\n",
                        vtos(ov_org),
                        vtos(getpropertyvec(VF_ANGLES)),
                        ov_distance,
                        ov_nearest,
-                       ov_furthest));
+                       ov_furthest);
                #endif
        }
 
@@ -1238,7 +1238,7 @@ void CSQC_UpdateView(float w, float h)
                                }
                        }
 
-                       //print(sprintf("crosshair style: %s\n", wcross_style));
+                       //printf("crosshair style: %s\n", wcross_style);
                        wcross_name = strcat("gfx/crosshair", wcross_style);
 
                        // MAIN CROSSHAIR COLOR DECISION
index fda38b1..9d02494 100644 (file)
@@ -131,7 +131,7 @@ void BGMScript_InitEntity(entity e)
                e.bgmscriptline = e.bgmscriptline0 = i;
                if(i >= bgmscriptbufsize)
                {
-                       print(sprintf("ERROR: bgmscript does not define %s\n", e.bgmscript));
+                       printf("ERROR: bgmscript does not define %s\n", e.bgmscript);
                        strunzone(e.bgmscript);
                        e.bgmscript = string_null;
                }
index fb87f9a..6f008fb 100644 (file)
@@ -114,7 +114,7 @@ void CSQCPlayer_ModelAppearance_PostUpdate(void)
                self.forceplayermodels_isgoodmodel = fexists(self.forceplayermodels_savemodel);
                self.forceplayermodels_isgoodmodel_mdl = self.forceplayermodels_savemodel;
                if(!self.forceplayermodels_isgoodmodel)
-                       print(sprintf("Warning: missing model %s has been used\n", self.forceplayermodels_savemodel));
+                       printf("Warning: missing model %s has been used\n", self.forceplayermodels_savemodel);
        }
 }
 void CSQCPlayer_ModelAppearance_Apply(float islocalplayer)
@@ -292,7 +292,7 @@ void CSQCPlayer_ModelAppearance_Apply(float islocalplayer)
                else if(self.old_glowmod != '0 0 0') { self.old_glowmod = '0 0 0'; }
        }
 
-       //print(sprintf("CSQCPlayer_ModelAppearance_Apply(): state = %s, colormap = %f, glowmod = %s\n", (self.csqcmodel_isdead ? "DEAD" : "ALIVE"), self.colormap, vtos(self.glowmod)));
+       //printf("CSQCPlayer_ModelAppearance_Apply(): state = %s, colormap = %f, glowmod = %s\n", (self.csqcmodel_isdead ? "DEAD" : "ALIVE"), self.colormap, vtos(self.glowmod));
 }
 
 // FEATURE: fallback frames
@@ -362,7 +362,7 @@ float CSQCPlayer_FallbackFrame(float f)
                case 29: return 4; // anim_duckwalkbackright -> anim_duckwalk
                case 30: return 4; // anim_duckwalkbackleft -> anim_duckwalk
        }
-       print(sprintf("Frame %d missing in model %s, and we have no fallback - FAIL!\n", f, self.model));
+       printf("Frame %d missing in model %s, and we have no fallback - FAIL!\n", f, self.model);
        return f;
 }
 void CSQCPlayer_FallbackFrame_Apply(void)
index 8bb221f..2521425 100644 (file)
@@ -4095,7 +4095,7 @@ float centerprint_showing;
 
 void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num)
 {
-       //print(sprintf("centerprint_generic(%d, '%s^7', %d, %d);\n", new_id, strMessage, duration, countdown_num));
+       //printf("centerprint_generic(%d, '%s^7', %d, %d);\n", new_id, strMessage, duration, countdown_num);
        float i, j;
 
        if(strMessage == "" && new_id == 0)
index 1fe76b0..c2432b9 100644 (file)
@@ -344,7 +344,7 @@ if(panel.update_time <= time) { \
                strunzone(panel.current_panel_bg); \
        if(panel_bg == "")\
        {\
-               /*print(sprintf("^xf08 %s panel: panel_bg is empty\n", panel.panel_name));*/\
+               /*printf("^xf08 %s panel: panel_bg is empty\n", panel.panel_name);*/\
                panel_bg = "0";\
        }\
        panel.current_panel_bg = strzone(panel_bg); \
@@ -361,7 +361,7 @@ if(panel.update_time <= time) { \
        panel_bg = panel.current_panel_bg; \
        if(panel.current_panel_bg == "")\
        {\
-               /*print(sprintf("^xf08 %s panel: panel.current_panel_bg is empty\n", panel.panel_name));*/\
+               /*printf("^xf08 %s panel: panel.current_panel_bg is empty\n", panel.panel_name);*/\
                panel_bg = "0";\
        }\
        panel_bg_alpha = panel.current_panel_bg_alpha; \
index 869e30d..d361454 100644 (file)
@@ -193,11 +193,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
 
-               print(sprintf(_("^2Successfully exported to %s! (Note: It's saved in data/data/)\n"), filename));
+               printf(_("^2Successfully exported to %s! (Note: It's saved in data/data/)\n"), filename);
                fclose(fh);
        }
        else
-               print(sprintf(_("^1Couldn't write to %s\n"), filename));
+               printf(_("^1Couldn't write to %s\n"), filename);
 }
 
 void HUD_Configure_Exit_Force()
index b1dcce0..61e527c 100644 (file)
@@ -612,7 +612,7 @@ void URI_Get_Callback(float id, float status, string data)
        }
        else
        {
-               print(sprintf("Received HTTP request data for an invalid id %d.\n", id));
+               printf("Received HTTP request data for an invalid id %d.\n", id);
        }
 }
 
index 22bbd14..402e44c 100644 (file)
@@ -160,10 +160,10 @@ float _Movetype_UnstickEntity() // SV_UnstickEntity
                if(!_Movetype_TestEntityPosition('0 0 -1' * i)) goto success;
                if(!_Movetype_TestEntityPosition('0 0 1' * i)) goto success;
        }
-       dprint(sprintf(_("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n"), num_for_edict(self), self.classname, vtos(self.move_origin)));
+       dprintf(_("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
-       dprint(sprintf(_("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n"), num_for_edict(self), self.classname, vtos(self.move_origin)));
+       dprintf(_("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 7784fc1..ad5e23a 100644 (file)
@@ -84,8 +84,8 @@ void skel_set_boneabs(float s, float bone, vector absorg)
 
        /*
        vector neworg = skel_get_boneabs(s, bone);
-       print(sprintf("ANG: want: %v, got: %v\n", absang, fixedvectoangles2(v_forward, v_up)));
-       print(sprintf("ORG: want: %v, got: %v\n", absorg, neworg));
+       printf("ANG: want: %v, got: %v\n", absang, fixedvectoangles2(v_forward, v_up));
+       printf("ORG: want: %v, got: %v\n", absorg, neworg);
        */
 }
 
@@ -150,8 +150,8 @@ void skeleton_from_frames(entity e, float is_dead)
                        e.lerpfrac3 = 0;
                        e.lerpfrac4 = savelerpfrac4 * 2;
                }
-               //print(sprintf("Run: bone %d to %d, type %d\n", firstbone + 1, bone, bonetype));
-               //print(sprintf("frame %d %d %d %d lerpfrac * %d %d %d\n", e.frame, e.frame2, e.frame3, e.frame4, e.lerpfrac, e.lerpfrac3, e.lerpfrac4));
+               //printf("Run: bone %d to %d, type %d\n", firstbone + 1, bone, bonetype);
+               //printf("frame %d %d %d %d lerpfrac * %d %d %d\n", e.frame, e.frame2, e.frame3, e.frame4, e.lerpfrac, e.lerpfrac3, e.lerpfrac4);
                skel_build(s, e, m, 0, firstbone + 1, bone);
        }
        e.lerpfrac = savelerpfrac;
index b037d03..8a7d3fd 100644 (file)
@@ -410,7 +410,7 @@ void Cmd_HUD_SetFields(float argc)
                        else
                        {
                                if (!nocomplain)
-                                       print(sprintf("^1Error:^7 Unknown score field: '%s'\n", str));
+                                       printf("^1Error:^7 Unknown score field: '%s'\n", str);
                                continue;
                        }
 :found
@@ -481,7 +481,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;
-                       print(sprintf("fixed missing field '%s'\n", scores_label[ps_secondary]));
+                       printf("fixed missing field '%s'\n", scores_label[ps_secondary]);
                }
                if(!have_primary)
                {
@@ -490,7 +490,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;
-                       print(sprintf("fixed missing field '%s'\n", scores_label[ps_primary]));
+                       printf("fixed missing field '%s'\n", scores_label[ps_primary]);
                }
        }
 
index f30e77a..fa116dc 100644 (file)
@@ -91,7 +91,7 @@ void Net_TargetMusic()
                sound(e, CH_BGM_SINGLE, e.noise, 0, ATTEN_NONE);
                if(getsoundtime(e, CH_BGM_SINGLE) < 0)
                {
-                       print(sprintf(_("Cannot initialize sound %s\n"), e.noise));
+                       printf(_("Cannot initialize sound %s\n"), e.noise);
                        strunzone(e.noise);
                        e.noise = string_null;
                }
@@ -180,7 +180,7 @@ void Ent_ReadTriggerMusic()
                        sound(self, CH_BGM_SINGLE, self.noise, 0, ATTEN_NONE);
                        if(getsoundtime(self, CH_BGM_SINGLE) < 0)
                        {
-                               print(sprintf(_("Cannot initialize sound %s\n"), self.noise));
+                               printf(_("Cannot initialize sound %s\n"), self.noise);
                                strunzone(self.noise);
                                self.noise = string_null;
                        }
index 2088348..ba64006 100644 (file)
@@ -291,7 +291,7 @@ void turret_draw2d()
        if(rgb == '0 0 0')
        {
                self.teamradar_color = '1 0 1';
-               print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage));
+               printf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
        }
 
        txt = self.netname;
index a3e856d..cde516b 100644 (file)
@@ -457,7 +457,7 @@ void Draw_WaypointSprite()
        if(rgb == '0 0 0')
        {
                self.teamradar_color = '1 0 1';
-               print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage));
+               printf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage);
        }
 
        if(time - floor(time) > 0.5)
index 5e8accb..08b0b69 100644 (file)
@@ -28,7 +28,7 @@ void Curl_URI_Get_Callback(float id, float status, string data)
        do_cvar = curl_uri_get_cvar[i];
        if(status != 0)
        {
-               print(sprintf(_("error: status is %d\n"), status));
+               printf(_("error: status is %d\n"), status);
                if(do_cvar)
                        strunzone(do_cvar);
                return;
@@ -252,12 +252,12 @@ void GenericCommand_dumpnotifs(float request)
                        if(fh >= 0)
                        {
                                Dump_Notifications(fh, alsoprint);
-                               print(sprintf("Dumping notifications... File located in ^2data/data/%s^7.\n", filename));
+                               printf("Dumping notifications... File located in ^2data/data/%s^7.\n", filename);
                                fclose(fh);
                        }
                        else
                        {
-                               print(sprintf("^1Error: ^7Could not open file '%s'!\n", filename));
+                               printf("^1Error: ^7Could not open file '%s'!\n", filename);
                        }
                        #else
                        print(_("Notification dump command only works with cl_cmd and sv_cmd.\n"));
@@ -433,7 +433,7 @@ void GenericCommand_restartnotifs(float request)
                case CMD_REQUEST_COMMAND:
                {
                        #ifndef MENUQC
-                       print(sprintf(
+                       printf(
                                strcat(
                                        "Restart_Notifications(): Restarting %d notifications... ",
                                        "Counts: MSG_ANNCE = %d, MSG_INFO = %d, MSG_CENTER = %d, MSG_MULTI = %d, MSG_CHOICE = %d\n"
@@ -450,7 +450,7 @@ void GenericCommand_restartnotifs(float request)
                                NOTIF_CENTER_COUNT,
                                NOTIF_MULTI_COUNT,
                                NOTIF_CHOICE_COUNT
-                       ));
+                       );
                        Destroy_All_Notifications();
                        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
                        #else
index df71154..3fddd70 100644 (file)
@@ -51,11 +51,11 @@ 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
-       print(sprintf("MASS: %f\nv: %v -> %v\nENERGY BEFORE == %f + %f = %f\nENERGY AFTER >= %f\n",
+       printf("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,
-               (target_v + v) * (target_v + v)));
+               (target_v + v) * (target_v + v));
        return v;
 #endif
        return explosion_f * explosion_calcpush_getmultiplier(explosion_f * speedfactor, target_v);
index 8c29751..3605d0b 100644 (file)
@@ -281,7 +281,7 @@ string Process_Notif_Line(
        // done to both MSG_INFO and MSG_CENTER
        if(substring(input, (strlen(input) - 1), 1) == "\n")
        {
-               print(sprintf(
+               printf(
                        strcat(
                                "^1TRAILING NEW LINE AT END OF NOTIFICATION: ",
                                "^7net_type = %s, net_name = %s, string = %s.\n"
@@ -289,7 +289,7 @@ string Process_Notif_Line(
                        notiftype,
                        notifname,
                        stringtype
-               ));
+               );
                notif_error = TRUE;
                input = substring(input, 1, (strlen(input) - 1));
        }
@@ -316,7 +316,7 @@ string Process_Notif_Args(
                        {
                                if(sel_num == NOTIF_MAX_ARGS)
                                {
-                                       print(sprintf(
+                                       printf(
                                                strcat(
                                                        "^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
                                                        "^7net_type = %s, net_name = %s, max args = %d.\n"
@@ -324,7 +324,7 @@ string Process_Notif_Args(
                                                notiftype,
                                                notifname,
                                                NOTIF_MAX_ARGS
-                                       ));
+                                       );
                                        notif_error = TRUE;
                                        break;
                                }
@@ -348,7 +348,7 @@ string Process_Notif_Args(
                                        #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
-                                               print(sprintf(
+                                               printf(
                                                        strcat(
                                                                "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
                                                                "^7net_type = %s, net_name = %s, args arg = '%s'.\n"
@@ -356,7 +356,7 @@ string Process_Notif_Args(
                                                        notiftype,
                                                        notifname,
                                                        selected
-                                               ));
+                                               );
                                                notif_error = TRUE;
                                                break;
                                        }
@@ -367,7 +367,7 @@ string Process_Notif_Args(
                        {
                                if(sel_num == NOTIF_MAX_HUDARGS)
                                {
-                                       print(sprintf(
+                                       printf(
                                                strcat(
                                                        "^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
                                                        "^7net_type = %s, net_name = %s, max hudargs = %d.\n"
@@ -375,7 +375,7 @@ string Process_Notif_Args(
                                                notiftype,
                                                notifname,
                                                NOTIF_MAX_HUDARGS
-                                       ));
+                                       );
                                        notif_error = TRUE;
                                        break;
                                }
@@ -399,7 +399,7 @@ string Process_Notif_Args(
                                        #undef ARG_CASE_ARG_CS_SV_HA
                                        default:
                                        {
-                                               print(sprintf(
+                                               printf(
                                                        strcat(
                                                                "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
                                                                "^7net_type = %s, net_name = %s, hudargs arg = '%s'.\n"
@@ -407,7 +407,7 @@ string Process_Notif_Args(
                                                        notiftype,
                                                        notifname,
                                                        selected
-                                               ));
+                                               );
                                                notif_error = TRUE;
                                                break;
                                        }
@@ -418,7 +418,7 @@ string Process_Notif_Args(
                        {
                                if(sel_num == NOTIF_MAX_DURCNT)
                                {
-                                       print(sprintf(
+                                       printf(
                                                strcat(
                                                        "^1NOTIFICATION HAS TOO MANY ARGUMENTS: ",
                                                        "^7net_type = %s, net_name = %s, max durcnt = %d.\n"
@@ -426,7 +426,7 @@ string Process_Notif_Args(
                                                notiftype,
                                                notifname,
                                                NOTIF_MAX_DURCNT
-                                       ));
+                                       );
                                        notif_error = TRUE;
                                        break;
                                }
@@ -453,7 +453,7 @@ string Process_Notif_Args(
                                                if(ftos(stof(selected)) != "") { ++sel_num; }
                                                else
                                                {
-                                                       print(sprintf(
+                                                       printf(
                                                                strcat(
                                                                        "^1NOTIFICATION WITH UNKNOWN TOKEN IN ARGUMENT STRING: ",
                                                                        "^7net_type = %s, net_name = %s, durcnt arg = '%s'.\n"
@@ -461,7 +461,7 @@ string Process_Notif_Args(
                                                                notiftype,
                                                                notifname,
                                                                selected
-                                                       ));
+                                                       );
                                                        notif_error = TRUE;
                                                }
                                                break;
@@ -591,14 +591,14 @@ void Create_Notification_Entity(
                                }
                                else
                                {
-                                       print(sprintf(
+                                       printf(
                                                strcat(
                                                        "^1NOTIFICATION WITH NO SOUND: ",
                                                        "^7net_type = %s, net_name = %s.\n"
                                                ),
                                                typestring,
                                                namestring
-                                       ));
+                                       );
                                        notif_error = TRUE;
                                }
                        }
@@ -638,7 +638,7 @@ void Create_Notification_Entity(
                                        }
                                        else if((hudargs == "") && (durcnt ==""))
                                        {
-                                               print(sprintf(
+                                               printf(
                                                        strcat(
                                                                "^1NOTIFICATION HAS ARG COUNTS BUT NO ARGS OR HUDARGS OR DURCNT: ",
                                                                "^7net_type = %s, net_name = %s, strnum = %d, flnum = %d\n"
@@ -647,7 +647,7 @@ void Create_Notification_Entity(
                                                        namestring,
                                                        strnum,
                                                        flnum
-                                               ));
+                                               );
                                                notif_error = TRUE;
                                        }
                                }
@@ -672,27 +672,27 @@ void Create_Notification_Entity(
                                        if(icon != "") { notif.nent_icon = strzone(icon); }
                                        else
                                        {
-                                               print(sprintf(
+                                               printf(
                                                        strcat(
                                                                "^1NOTIFICATION HAS HUDARGS BUT NO ICON: ",
                                                                "^7net_type = %s, net_name = %s.\n"
                                                        ),
                                                        typestring,
                                                        namestring
-                                               ));
+                                               );
                                                notif_error = TRUE;
                                        }
                                }
                                else if(icon != "")
                                {
-                                       print(sprintf(
+                                       printf(
                                                strcat(
                                                        "^1NOTIFICATION HAS ICON BUT NO HUDARGS: ",
                                                        "^7net_type = %s, net_name = %s.\n"
                                                ),
                                                typestring,
                                                namestring
-                                       ));
+                                       );
                                        notif_error = TRUE;
                                }
 
@@ -704,14 +704,14 @@ void Create_Notification_Entity(
                                        if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
                                        else
                                        {
-                                               print(sprintf(
+                                               printf(
                                                        strcat(
                                                                "^1NOTIFICATION HAS DURCNT BUT NO CPID: ",
                                                                "^7net_type = %s, net_name = %s.\n"
                                                        ),
                                                        typestring,
                                                        namestring
-                                               ));
+                                               );
                                                notif_error = TRUE;
                                        }
                                }
@@ -746,14 +746,14 @@ void Create_Notification_Entity(
                                // Check to make sure a string was chosen
                                if(notif.nent_string == "")
                                {
-                                       print(sprintf(
+                                       printf(
                                                strcat(
                                                        "^1EMPTY NOTIFICATION: ",
                                                        "^7net_type = %s, net_name = %s.\n"
                                                ),
                                                typestring,
                                                namestring
-                                       ));
+                                       );
                                        notif_error = TRUE;
                                }
                        }
@@ -766,14 +766,14 @@ void Create_Notification_Entity(
                        // Set MSG_MULTI string/float counts
                        if((anncename == NO_MSG) && (infoname == NO_MSG) && (centername == NO_MSG))
                        {
-                               print(sprintf(
+                               printf(
                                        strcat(
                                                "^1NOTIFICATION WITH NO SUBCALLS: ",
                                                "^7net_type = %s, net_name = %s.\n"
                                        ),
                                        typestring,
                                        namestring
-                               ));
+                               );
                                notif_error = TRUE;
                        }
                        else
@@ -810,14 +810,14 @@ void Create_Notification_Entity(
                {
                        if((chtype == NO_MSG) || (optiona == NO_MSG) || (optionb == NO_MSG))
                        {
-                               print(sprintf(
+                               printf(
                                        strcat(
                                                "^1NOTIFICATION IS MISSING CHOICE PARAMS: ",
                                                "^7net_type = %s, net_name = %s.\n"
                                        ),
                                        typestring,
                                        namestring
-                               ));
+                               );
                                notif_error = TRUE;
                        }
                        else
@@ -857,14 +857,14 @@ void Create_Notification_Entity(
 
                                        default:
                                        {
-                                               print(sprintf(
+                                               printf(
                                                        strcat(
                                                                "^1NOTIFICATION WITH IMPROPER TYPE: ",
                                                                "^7net_type = %d, net_name = %s.\n"
                                                        ),
                                                        typeid,
                                                        namestring
-                                               ));
+                                               );
                                                notif_error = TRUE;
                                                break;
                                        }
@@ -900,14 +900,14 @@ void Create_Notification_Entity(
 
                default:
                {
-                       print(sprintf(
+                       printf(
                                strcat(
                                        "^1NOTIFICATION WITH IMPROPER TYPE: ",
                                        "^7net_type = %d, net_name = %s.\n"
                                ),
                                typeid,
                                namestring
-                       ));
+                       );
                        notif_error = TRUE;
                        break;
                }
index 6c60221..35bcefa 100644 (file)
@@ -1465,7 +1465,7 @@ void RegisterNotifications_First()
        #define dedi ""
        #endif
 
-       print(sprintf("Beginning notification initialization on %s%s program...\n", dedi, PROGNAME));
+       printf("Beginning notification initialization on %s%s program...\n", dedi, PROGNAME);
 
        // maybe do another implementation of this with checksums? for now, we don't need versioning
        /*if(autocvar_notification_version != NOTIF_VERSION)
@@ -1477,8 +1477,8 @@ void RegisterNotifications_First()
                #endif
                        notif_global_error = TRUE;
 
-               print(sprintf("^1NOTIFICATION VERSION MISMATCH: ^7program = %s, config = %d, code = %d.\n",
-                       PROGNAME, autocvar_notification_version, NOTIF_VERSION));
+               printf("^1NOTIFICATION VERSION MISMATCH: ^7program = %s, config = %d, code = %d.\n",
+                       PROGNAME, autocvar_notification_version, NOTIF_VERSION);
        }*/
 }
 
index 15193fd..ac792a3 100644 (file)
@@ -3,7 +3,7 @@ float TEST_ok;
 
 void TEST_Fail(string cond)
 {
-       print(sprintf("Assertion failed: ", cond));
+       printf("Assertion failed: ", cond);
        //backtrace();
        ++TEST_failed;
 }
@@ -27,29 +27,29 @@ float TEST_RunAll()
        }
        if(f)
        {
-               print(sprintf("%d tests failed\n", f));
+               printf("%d tests failed\n", f);
                return 1;
        }
        else
        {
-               print(sprintf("All tests OK\n", f));
+               printf("All tests OK\n", f);
                return 0;
        }
 }
 
 float TEST_Run(string s)
 {
-       print(sprintf("%s: testing...\n", s));
+       printf("%s: testing...\n", s);
        TEST_failed = TEST_ok = 0;
        callfunction(strcat("_TEST_", s));
        if(TEST_failed > 0)
        {
-               print(sprintf("%s: %d items failed.\n", s, TEST_failed));
+               printf("%s: %d items failed.\n", s, TEST_failed);
                return 0;
        }
        else if(!TEST_ok)
        {
-               print(sprintf("%s: did not complete.\n", s));
+               printf("%s: did not complete.\n", s);
                return 0;
        }
        return 1;
index 9a5e0e7..c69d2f4 100644 (file)
@@ -33,7 +33,7 @@ float url_URI_Get_Callback(float id, float status, string data)
                return 0;
        if(e.url_rbuf >= 0 || e.url_wbuf >= 0)
        {
-               print(sprintf("WARNING: handle %d (%s) has already received data?!?\n", id + NUM_URL_ID, e.url_url));
+               printf("WARNING: handle %d (%s) has already received data?!?\n", id + NUM_URL_ID, e.url_url);
                return 0;
        }
 
index 15863f3..1904e91 100644 (file)
@@ -874,7 +874,7 @@ float cvar_settemp(string tmp_cvar, string tmp_value)
 
        if(!cvar_type(tmp_cvar))
        {
-               print(sprintf("Error: cvar %s doesn't exist!\n", tmp_cvar));
+               printf("Error: cvar %s doesn't exist!\n", tmp_cvar);
                return 0;
        }
 
@@ -911,7 +911,7 @@ float cvar_settemp_restore()
                        ++i;
                }
                else
-                       print(sprintf("Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.\n", e.netname));
+                       printf("Error: cvar %s doesn't exist anymore! It can still be restored once it's manually recreated.\n", e.netname);
        }
 
        return i;
index a9f9095..e4ce023 100644 (file)
@@ -367,6 +367,12 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
 // expand multiple arguments into one argument by stripping parenthesis
 #define XPD(...) __VA_ARGS__
 
+// Some common varargs functions. Lowercase as they match C.
+#define printf(...) print(sprintf(__VA_ARGS__))
+#define dprintf(...) dprint(sprintf(__VA_ARGS__))
+#define fprintf(file, ...) fputs(file, sprintf(__VA_ARGS__))
+#define bprintf(...) bprint(sprintf(__VA_ARGS__))
+
 #ifndef MENUQC
 void backtrace(string msg);
 #endif
index 46c312f..4f7381a 100644 (file)
@@ -60,13 +60,13 @@ void CSQCPlayer_SetPredictionError(vector o, vector v, float onground_diff)
        // commented out as this one did not help
        if(onground_diff)
        {
-               print(sprintf("ONGROUND MISMATCH: %d x=%v v=%v\n", onground_diff, o, v));
+               printf("ONGROUND MISMATCH: %d x=%v v=%v\n", onground_diff, o, v);
                return;
        }
        */
        if(vlen(o) > 32 || vlen(v) > 192)
        {
-               //print(sprintf("TOO BIG: x=%v v=%v\n", o, v));
+               //printf("TOO BIG: x=%v v=%v\n", o, v);
                return;
        }
 
index 5d0e743..8406af0 100644 (file)
@@ -79,7 +79,7 @@ void Label_recalcPositionWithText(entity me, string t)
                        me.realOrigin_x = me.keepspaceLeft;
                if(!me.overrideCondenseFactor)
                        me.condenseFactor = spaceAvail / spaceUsed;
-               dprint(sprintf(_("NOTE: label text %s too wide for label, condensed by factor %f\n"), t, me.condenseFactor));
+               dprintf(_("NOTE: label text %s too wide for label, condensed by factor %f\n"), t, me.condenseFactor);
        }
 
        if(!me.overrideRealOrigin_y)
index 1398e57..382a19d 100644 (file)
@@ -56,7 +56,7 @@ void m_init()
        check_unacceptable_compiler_bugs();
 
 #ifdef WATERMARK
-       print(sprintf(_("^4MQC Build information: ^1%s\n"), WATERMARK));
+       printf(_("^4MQC Build information: ^1%s\n"), WATERMARK);
 #endif
 
        // list all game dirs (TEST)
index e2a0e6c..0c7fe14 100644 (file)
@@ -205,11 +205,11 @@ void RegisterSLCategories()
                                } \
                                else \
                                { \
-                                       print(sprintf( \
+                                       printf( \
                                                "RegisterSLCategories(): Improper override '%s' for category '%s'!\n", \
                                                s, \
                                                categories[i].cat_name \
-                                       )); \
+                                       ); \
                                } \
                        } \
                        strunzone(categories[i].override_string); \
@@ -371,7 +371,7 @@ float CheckCategoryForEntry(float entry)
                        case "cts": 
                        case "xdf": { return CAT_DEFRAG; }
                        
-                       default: { dprint(sprintf("Found strange mod type: %s\n", modtype)); return CAT_MODIFIED; }
+                       default: { dprintf("Found strange mod type: %s\n", modtype); return CAT_MODIFIED; }
                }
        }
 
@@ -979,7 +979,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        float m, pure, freeslots, j, sflags;
        string s, typestr, versionstr, k, v, modname;
 
-       //print(sprintf("time: %f, i: %d, item: %d, nitems: %d\n", time, i, item, me.nItems));
+       //printf("time: %f, i: %d, item: %d, nitems: %d\n", time, i, item, me.nItems);
 
        vector oldscale = draw_scale;
        vector oldshift = draw_shift;
index f70f433..3f1c468 100644 (file)
@@ -96,7 +96,7 @@ void _TEST_XonoticDecibelsSlider()
                float v = fromDecibelOfSquare(db, -40);
                float dbv = toDecibelOfSquare(v, -40);
                float d = dbv - db;
-               print(sprintf("%f -> %f -> %f (diff: %f)\n", db, v, dbv, d));
+               printf("%f -> %f -> %f (diff: %f)\n", db, v, dbv, d);
                TEST_Check(fabs(d) > 0.02);
        }
        TEST_OK();
index 9f56bf6..d983680 100644 (file)
@@ -285,7 +285,7 @@ void URI_Get_Callback(float id, float status, string data)
        }
        else
        {
-               print(sprintf("Received HTTP request data for an invalid id %d.\n", id));
+               printf("Received HTTP request data for an invalid id %d.\n", id);
        }
 }
 
@@ -305,7 +305,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
        }
        if(status != 0)
        {
-               print(sprintf(_("error receiving update notification: status is %d\n"), status));
+               printf(_("error receiving update notification: status is %d\n"), status);
                return;
        }
        if(substring(data, 0, 1) == "<")
@@ -394,7 +394,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
                {
                        // update needed
                        _Nex_ExtResponseSystem_UpdateTo = strzone(un_version);
-                       if(un_download) { print(sprintf(_("Update can be downloaded at:\n%s\n"), un_download)); }
+                       if(un_download) { printf(_("Update can be downloaded at:\n%s\n"), un_download); }
                        if(un_url) { _Nex_ExtResponseSystem_UpdateToURL = strzone(un_url); }
                        DisableServerBackwardsCompatibility();
                }
index aca64a4..565c1cb 100644 (file)
@@ -5,7 +5,7 @@
 
 float accuracy_byte(float n, float d)
 {
-       //print(sprintf("accuracy: %d / %d\n", n, d));
+       //printf("accuracy: %d / %d\n", n, d);
        if(n <= 0)
                return 0;
        if(n > d)
index 5bd3b49..c4b3fe6 100644 (file)
@@ -66,13 +66,13 @@ float CheatsAllowed(float i, float argc, float fr) // the cheat gets passed as a
 
        // if we get here, player is not allowed to cheat. Log it.
        if(i)
-               bprint(sprintf("Player %s^7 tried to use cheat 'impulse %d'\n", self.netname, i));
+               bprintf("Player %s^7 tried to use cheat 'impulse %d'\n", self.netname, i);
        else if(argc)
-               bprint(sprintf("Player %s^7 tried to use cheat '%s'\n", self.netname, argv(0)));
+               bprintf("Player %s^7 tried to use cheat '%s'\n", self.netname, argv(0));
        else if(fr)
-               bprint(sprintf("Player %s^7 tried to use cheat frame %d\n", self.netname, fr));
+               bprintf("Player %s^7 tried to use cheat frame %d\n", self.netname, fr);
        else
-               bprint(sprintf("Player %s^7 tried to use an unknown cheat\n", self.netname));
+               bprintf("Player %s^7 tried to use an unknown cheat\n", self.netname);
 
        return 0;
 }
index d803602..2810c8b 100644 (file)
@@ -2620,7 +2620,7 @@ void PlayerPostThink (void)
 
        /*
        if(g_race)
-               dprint(sprintf("%f %.6f\n", time, race_GetFractionalLapCount(self)));
+               dprintf("%f %.6f\n", time, race_GetFractionalLapCount(self));
        */
 
        CSQCMODEL_AUTOUPDATE();
index 88397a8..2885e6d 100644 (file)
@@ -421,7 +421,7 @@ void W_WeaponFrame()
                        // VorteX: add player model weapon select frame here
                        // setcustomframe(PlayerWeaponRaise);
                        weapon_thinkf(WFRAME_IDLE, cvar(sprintf("g_balance_%s_switchdelay_raise", newwep.netname)), w_ready);
-                       //print(sprintf("W_WeaponFrame(): cvar: %s, value: %f\n", sprintf("g_balance_%s_switchdelay_raise", newwep.netname), cvar(sprintf("g_balance_%s_switchdelay_raise", newwep.netname))));
+                       //printf("W_WeaponFrame(): cvar: %s, value: %f\n", sprintf("g_balance_%s_switchdelay_raise", newwep.netname), cvar(sprintf("g_balance_%s_switchdelay_raise", newwep.netname)));
                        weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, '0 0 0');
                }
                else if (self.weaponentity.state == WS_DROP)
@@ -444,7 +444,7 @@ void W_WeaponFrame()
                        self.weaponentity.state = WS_DROP;
                        // set up weapon switch think in the future, and start drop anim
                        weapon_thinkf(WFRAME_DONTCHANGE, cvar(sprintf("g_balance_%s_switchdelay_drop", oldwep.netname)), w_clear);
-                       //print(sprintf("W_WeaponFrame(): cvar: %s, value: %f\n", sprintf("g_balance_%s_switchdelay_drop", oldwep.netname), cvar(sprintf("g_balance_%s_switchdelay_drop", oldwep.netname))));
+                       //printf("W_WeaponFrame(): cvar: %s, value: %f\n", sprintf("g_balance_%s_switchdelay_drop", oldwep.netname), cvar(sprintf("g_balance_%s_switchdelay_drop", oldwep.netname)));
                        weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, PLAYER_WEAPONSELECTION_RANGE);
 #ifndef INDEPENDENT_ATTACK_FINISHED
                        }
index 8d72a79..f3d675f 100644 (file)
@@ -547,14 +547,14 @@ void CL_Weaponentity_Think()
        {
                entity newwep = get_weaponinfo(self.owner.switchweapon);
                f = f * g_weaponratefactor / max(f, cvar(sprintf("g_balance_%s_switchdelay_raise", newwep.netname)));
-               //print(sprintf("CL_Weaponentity_Think(): cvar: %s, value: %f, nextthink: %f\n", sprintf("g_balance_%s_switchdelay_raise", newwep.netname), cvar(sprintf("g_balance_%s_switchdelay_raise", newwep.netname)), (self.owner.weapon_nextthink - time)));
+               //printf("CL_Weaponentity_Think(): cvar: %s, value: %f, nextthink: %f\n", sprintf("g_balance_%s_switchdelay_raise", newwep.netname), cvar(sprintf("g_balance_%s_switchdelay_raise", newwep.netname)), (self.owner.weapon_nextthink - time));
                self.angles_x = -90 * f * f;
        }
        else if (self.state == WS_DROP && !intermission_running)
        {
                entity oldwep = get_weaponinfo(self.owner.weapon);
                f = 1 - f * g_weaponratefactor / max(f, cvar(sprintf("g_balance_%s_switchdelay_drop", oldwep.netname)));
-               //print(sprintf("CL_Weaponentity_Think(): cvar: %s, value: %f, nextthink: %f\n", sprintf("g_balance_%s_switchdelay_drop", oldwep.netname), cvar(sprintf("g_balance_%s_switchdelay_drop", oldwep.netname)), (self.owner.weapon_nextthink - time)));
+               //printf("CL_Weaponentity_Think(): cvar: %s, value: %f, nextthink: %f\n", sprintf("g_balance_%s_switchdelay_drop", oldwep.netname), cvar(sprintf("g_balance_%s_switchdelay_drop", oldwep.netname)), (self.owner.weapon_nextthink - time));
                self.angles_x = -90 * f * f;
        }
        else if (self.state == WS_CLEAR)
index 363bb7c..9912482 100644 (file)
@@ -57,7 +57,7 @@ void ClientCommand_checkfail(float request, string command) // internal command,
        {
                case CMD_REQUEST_COMMAND:
                {
-                       print(sprintf("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))));
+                       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)));
                        self.checkfail = 1;
                        return; // never fall through to usage
                }
index c3e8ca9..e0016b2 100644 (file)
@@ -668,10 +668,10 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl
 
        first_command = argv(startpos);
 
-       /*dprint(sprintf("VoteCommand_parse(): Command: '%s', Length: %f.\n",
+       /*printf("VoteCommand_parse(): Command: '%s', Length: %f.\n",
                substring(vote_command, argv_start_index(startpos), strlen(vote_command) - argv_start_index(startpos)),
                strlen(substring(vote_command, argv_start_index(startpos), strlen(vote_command) - argv_start_index(startpos)))
-       ));*/
+       );*/
 
        if(
                (autocvar_sv_vote_limit > 0)
index 195829b..2ee79c4 100644 (file)
@@ -311,11 +311,11 @@ float Obituary_WeaponDeath(
                }
                else
                {
-                       dprint(sprintf(
+                       dprintf(
                                "Obituary_WeaponDeath(): ^1Deathtype ^7(%d)^1 has no notification for weapon %d!\n",
                                deathtype,
                                death_weapon
-                       ));
+                       );
                }
 
                return TRUE;
@@ -924,12 +924,12 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e
                                                        mininv_f = (vlen(force) * (1-tfloorforce)) / autocvar_g_throughfloor_force_max_stddev;
 
                                                        if(autocvar_g_throughfloor_debug)
-                                                               print(sprintf("THROUGHFLOOR: D=%f F=%f max(dD)=1/%f max(dF)=1/%f", finaldmg, vlen(force), mininv_d, mininv_f));
+                                                               printf("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)
-                                                               print(sprintf(" steps=%f", total));
+                                                               printf(" steps=%f", total);
 
                                                        if (IS_PLAYER(targ))
                                                                total = ceil(bound(autocvar_g_throughfloor_min_steps_player, total, autocvar_g_throughfloor_max_steps_player));
@@ -937,7 +937,7 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e
                                                                total = ceil(bound(autocvar_g_throughfloor_min_steps_other, total, autocvar_g_throughfloor_max_steps_other));
 
                                                        if(autocvar_g_throughfloor_debug)
-                                                               print(sprintf(" steps=%f dD=%f dF=%f", total, finaldmg * (1-tfloordmg) / (2 * sqrt(total)), vlen(force) * (1-tfloorforce) / (2 * sqrt(total))));
+                                                               printf(" 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)
                                                        {
@@ -964,7 +964,7 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e
                                                        force = force * a;
 
                                                        if(autocvar_g_throughfloor_debug)
-                                                               print(sprintf(" D=%f F=%f\n", finaldmg, vlen(force)));
+                                                               printf(" D=%f F=%f\n", finaldmg, vlen(force));
                                                }
 
                                                // laser force adjustments :P
index 90ef516..f0ea33b 100644 (file)
@@ -262,7 +262,7 @@ void PieceMinsMaxs(float rot, float pc)
                tet_piecemins_y = 1;
                tet_piecemaxs_y = sz_y;
        }
-       //print(sprintf("ce%v sz%v mi%v ma%v\n", ce, sz, tet_piecemins, tet_piecemaxs));
+       //printf("ce%v sz%v mi%v ma%v\n", ce, sz, tet_piecemins, tet_piecemaxs);
        if (rot == 1) // 90 degrees
        {
                t = tet_piecemins_y;
@@ -653,7 +653,7 @@ float BastetSearch(float buf, float pc, float x, float y, float rot, float move_
                s = BastetSearch(buf, pc, x, y+1, rot, move_bias + 2); if(s > sm) sm = s;
                if(s < 0)
                {
-                       //print(sprintf("MAY CEMENT AT: %d %d %d\n", x, y, rot));
+                       //printf("MAY CEMENT AT: %d %d %d\n", x, y, rot);
                        // moving down did not work - that means we can fixate the block here
                        t1 = gettime(GETTIME_HIRES);
 
@@ -699,7 +699,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);
 
        var float t2 = gettime(GETTIME_HIRES);
-       dprint(sprintf("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)));
+       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));
 
        // sort
        float i, j, k, p, s;
@@ -707,7 +707,7 @@ float BastetPiece()
 /*
        for(i = 0; i < 7; ++i)
        {
-               print(sprintf("piece %s value = %d\n", substring("OJLIZST", bastet_piece[i]-1, 1), bastet_score[i]));
+               printf("piece %s value = %d\n", substring("OJLIZST", bastet_piece[i]-1, 1), bastet_score[i]);
        }
 */
 
index e7e771d..722bc40 100644 (file)
@@ -1722,7 +1722,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");
-               dprint(sprintf("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)));
+               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));
                checkclient();
        }
     if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
index f70aa04..2e08109 100644 (file)
@@ -72,7 +72,7 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep
                        mmax = 240 / mintempo; // 60 = "0.25 means 1 sec", at 120 0.5 means 1 sec, at 240 1 means 1 sec
                else
                        mmax = 240; // you won't try THAT hard... (tempo 1)
-               //print(sprintf("initial tempo rules: %f %f\n", mmin, mmax));
+               //printf("initial tempo rules: %f %f\n", mmin, mmax);
 
                for(i = 0; i < n; ++i)
                {
@@ -96,10 +96,10 @@ float W_Tuba_HasPlayed(entity pl, string melody, float instrument, float ignorep
 
                                // vi_x <= vi_y <= vj_x <= vj_y
                                // ti <= tj
-                               //print(sprintf("first note: %f to %f, should be %f\n", vi_x, vi_y, ti));
-                               //print(sprintf("second note: %f to %f, should be %f\n", vj_x, vj_y, tj));
-                               //print(sprintf("m1 = %f\n", (vi_x - vj_y) / (ti - tj)));
-                               //print(sprintf("m2 = %f\n", (vi_y - vj_x) / (ti - tj)));
+                               //printf("first note: %f to %f, should be %f\n", vi_x, vi_y, ti);
+                               //printf("second note: %f to %f, should be %f\n", vj_x, vj_y, tj);
+                               //printf("m1 = %f\n", (vi_x - vj_y) / (ti - tj));
+                               //printf("m2 = %f\n", (vi_y - vj_x) / (ti - tj));
                                mmin = max(mmin, (vi_x - vj_y) / (ti - tj)); // lower bound
                                mmax = min(mmax, (vi_y - vj_x) / (ti - tj)); // upper bound
                        }
index 5370ba5..f55cec1 100644 (file)
@@ -13,7 +13,7 @@ void WarpZone_Fade_PreDraw()
                self.alpha = bound(0, (self.warpzone_fadeend - vlen(org - self.origin - 0.5 * (self.mins + self.maxs))) / (self.warpzone_fadeend - self.warpzone_fadestart), 1);
        else
                self.alpha = 1;
-       //print(sprintf("%v <-> %v\n", view_origin, self.origin + 0.5 * (self.mins + self.maxs)));
+       //printf("%v <-> %v\n", view_origin, self.origin + 0.5 * (self.mins + self.maxs));
        if(self.alpha <= 0)
                self.drawmask = 0;
        else