From 83e2b5d506f912b9c79f7f6dc8e295f9b3f96e49 Mon Sep 17 00:00:00 2001 From: TimePath Date: Mon, 26 Jan 2015 19:51:39 +1100 Subject: [PATCH] Clean up macros --- qcsrc/client/View.qc | 5 ++-- qcsrc/client/command/cl_cmd.qc | 20 ++++++------- qcsrc/client/csqcmodel_hooks.qc | 17 +++++------ qcsrc/client/hud.qc | 44 +++++++++++++++------------- qcsrc/client/laser.qc | 2 +- qcsrc/client/miscfunctions.qc | 33 +++++++++++---------- qcsrc/common/command/generic.qc | 8 ++--- qcsrc/common/notifications.qc | 33 +++++++++++---------- qcsrc/common/notifications.qh | 4 ++- qcsrc/common/weapons/config.qc | 6 ++-- qcsrc/common/weapons/config.qh | 5 ++-- qcsrc/common/weapons/w_arc.qc | 4 +-- qcsrc/common/weapons/w_blaster.qc | 4 +-- qcsrc/common/weapons/w_crylink.qc | 4 +-- qcsrc/common/weapons/w_devastator.qc | 4 +-- qcsrc/common/weapons/w_electro.qc | 4 +-- qcsrc/common/weapons/w_fireball.qc | 4 +-- qcsrc/common/weapons/w_hagar.qc | 4 +-- qcsrc/common/weapons/w_hlac.qc | 4 +-- qcsrc/common/weapons/w_hmg.qc | 4 +-- qcsrc/common/weapons/w_hook.qc | 4 +-- qcsrc/common/weapons/w_machinegun.qc | 4 +-- qcsrc/common/weapons/w_minelayer.qc | 4 +-- qcsrc/common/weapons/w_mortar.qc | 4 +-- qcsrc/common/weapons/w_porto.qc | 4 +-- qcsrc/common/weapons/w_rifle.qc | 4 +-- qcsrc/common/weapons/w_rpc.qc | 4 +-- qcsrc/common/weapons/w_seeker.qc | 4 +-- qcsrc/common/weapons/w_shockwave.qc | 4 +-- qcsrc/common/weapons/w_shotgun.qc | 4 +-- qcsrc/common/weapons/w_tuba.qc | 4 +-- qcsrc/common/weapons/w_vaporizer.qc | 4 +-- qcsrc/common/weapons/w_vortex.qc | 4 +-- qcsrc/server/command/banning.qc | 8 ++--- qcsrc/server/command/cmd.qc | 8 ++--- qcsrc/server/command/common.qc | 8 ++--- qcsrc/server/command/sv_cmd.qc | 8 ++--- qcsrc/server/command/vote.qc | 6 ++-- 38 files changed, 155 insertions(+), 148 deletions(-) diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 9a69aced8..a2d728d0e 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -1334,10 +1334,11 @@ void CSQC_UpdateView(float w, float h) camera_active = false; } } + else #ifdef CAMERATEST - else if(autocvar_camera_enable) + if(autocvar_camera_enable) #else - else if(autocvar_camera_enable && isdemo()) + if(autocvar_camera_enable && isdemo()) #endif { // Enable required Darkplaces cvars diff --git a/qcsrc/client/command/cl_cmd.qc b/qcsrc/client/command/cl_cmd.qc index e8f3600d4..edf265625 100644 --- a/qcsrc/client/command/cl_cmd.qc +++ b/qcsrc/client/command/cl_cmd.qc @@ -416,7 +416,7 @@ void LocalCommand_macro_help() #define CLIENT_COMMAND(name,function,description) \ { if(strtolower(description) != "") { print(" ^2", name, "^7: ", description, "\n"); } } - CLIENT_COMMANDS(0, 0) + CLIENT_COMMANDS(0, 0); #undef CLIENT_COMMAND return; @@ -427,7 +427,7 @@ bool LocalCommand_macro_command(int argc) #define CLIENT_COMMAND(name,function,description) \ { if(name == strtolower(argv(0))) { function; return true; } } - CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc) + CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc); #undef CLIENT_COMMAND return false; @@ -438,7 +438,7 @@ bool LocalCommand_macro_usage(int argc) #define CLIENT_COMMAND(name,function,description) \ { if(name == strtolower(argv(1))) { function; return true; } } - CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc) + CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc); #undef CLIENT_COMMAND return false; @@ -449,7 +449,7 @@ void LocalCommand_macro_write_aliases(int fh) #define CLIENT_COMMAND(name,function,description) \ { if(strtolower(description) != "") { CMD_Write_Alias("qc_cmd_cl", name, description); } } - CLIENT_COMMANDS(0, 0) + CLIENT_COMMANDS(0, 0); #undef CLIENT_COMMAND return; @@ -516,14 +516,14 @@ void GameCommand(string command) // These functions are here specifically to add special + - commands to the game, and are not really normal commands. // Please add client commands to the function above this, as this is only for special reasons. -#define CONSOLE_COMMANDS_NORMAL \ +#define CONSOLE_COMMANDS_NORMAL() \ CONSOLE_COMMAND("+showscores", { scoreboard_showscores = true; }) \ CONSOLE_COMMAND("-showscores", { scoreboard_showscores = false; }) \ CONSOLE_COMMAND("+showaccuracy", { scoreboard_showaccuracy = true; }) \ CONSOLE_COMMAND("-showaccuracy", { scoreboard_showaccuracy = false; }) \ /* nothing */ -#define CONSOLE_COMMANDS_MOVEMENT \ +#define CONSOLE_COMMANDS_MOVEMENT() \ CONSOLE_COMMAND("+forward", { ++camera_direction.x; }) \ CONSOLE_COMMAND("-forward", { --camera_direction.x; }) \ CONSOLE_COMMAND("+back", { --camera_direction.x; }) \ @@ -548,7 +548,7 @@ void ConsoleCommand_macro_init() #define CONSOLE_COMMAND(name,execution) \ { registercommand(name); } - CONSOLE_COMMANDS_NORMAL + CONSOLE_COMMANDS_NORMAL(); #undef CONSOLE_COMMAND // then init movement commands @@ -559,7 +559,7 @@ void ConsoleCommand_macro_init() #define CONSOLE_COMMAND(name,execution) \ { registercommand(name); } - CONSOLE_COMMANDS_MOVEMENT + CONSOLE_COMMANDS_MOVEMENT(); #undef CONSOLE_COMMAND #ifndef CAMERATEST } @@ -573,7 +573,7 @@ bool ConsoleCommand_macro_normal(int argc) #define CONSOLE_COMMAND(name,execution) \ { if(name == strtolower(argv(0))) { { execution } return true; } } - CONSOLE_COMMANDS_NORMAL + CONSOLE_COMMANDS_NORMAL(); #undef CONSOLE_COMMAND return false; @@ -586,7 +586,7 @@ bool ConsoleCommand_macro_movement(int argc) #define CONSOLE_COMMAND(name,execution) \ { if(name == strtolower(argv(0))) { { execution } return true; } } - CONSOLE_COMMANDS_MOVEMENT + CONSOLE_COMMANDS_MOVEMENT(); #undef CONSOLE_COMMAND } diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index e174429fe..9a311fab9 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -322,16 +322,15 @@ void CSQCPlayer_FallbackFrame_PostUpdate(bool isnew) // player "pops in" if(isnew) { -#define FIX_FRAMETIME(f,ft) \ - if(IS_DEAD_FRAME(self.f) && self.ft != 0 && self.death_time != 0) \ - { \ - self.ft = self.death_time; \ - } - FIX_FRAMETIME(frame, frame1time) - FIX_FRAMETIME(frame2, frame2time) +#define FIX_FRAMETIME(f,ft) do { \ + if(IS_DEAD_FRAME(self.f) && self.ft != 0 && self.death_time != 0) \ + self.ft = self.death_time; \ +} while(0) + FIX_FRAMETIME(frame, frame1time); + FIX_FRAMETIME(frame2, frame2time); #ifdef CSQCMODEL_HAVE_TWO_FRAMES - FIX_FRAMETIME(frame3, frame3time) - FIX_FRAMETIME(frame4, frame4time) + FIX_FRAMETIME(frame3, frame3time); + FIX_FRAMETIME(frame4, frame4time); #endif } self.csqcmodel_isdead = IS_DEAD_FRAME(self.frame); diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index ac1208d7e..9c733efbd 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -263,9 +263,10 @@ HUD panels */ // draw the background/borders -#define HUD_Panel_DrawBg(theAlpha)\ -if(panel.current_panel_bg != "0" && panel.current_panel_bg != "")\ - draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel.current_panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * theAlpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER)) +#define HUD_Panel_DrawBg(theAlpha) do { \ + if(panel.current_panel_bg != "0" && panel.current_panel_bg != "") \ + draw_BorderPicture(panel_pos - '1 1 0' * panel_bg_border, panel.current_panel_bg, panel_size + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha * theAlpha, '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER));\ +} while(0) //basically the same code of draw_ButtonPicture and draw_VertButtonPicture for the menu void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, float vertical, float baralign, vector theColor, float theAlpha, float drawflag) @@ -3624,11 +3625,12 @@ void HUD_EngineInfo(void) // Info messages panel (#14) // -#define drawInfoMessage(s)\ - if(autocvar_hud_panel_infomessages_flip)\ - o_x = pos.x + mySize.x - stringwidth(s, true, fontsize);\ - drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL);\ - o.y += fontsize.y; +#define drawInfoMessage(s) do { \ + if(autocvar_hud_panel_infomessages_flip) \ + o_x = pos.x + mySize.x - stringwidth(s, true, fontsize); \ + drawcolorcodedstring(o, s, fontsize, a, DRAWFLAG_NORMAL); \ + o.y += fontsize.y; \ +} while(0) void HUD_InfoMessages(void) { if(!autocvar__hud_configure) @@ -3686,22 +3688,22 @@ void HUD_InfoMessages(void) s = _("^1Observing"); else s = sprintf(_("^1Spectating: ^7%s"), GetPlayerName(player_localentnum - 1)); - drawInfoMessage(s) + drawInfoMessage(s); if(spectatee_status == -1) s = sprintf(_("^1Press ^3%s^1 to spectate"), getcommandkey("primary fire", "+fire")); else s = sprintf(_("^1Press ^3%s^1 or ^3%s^1 for next or previous player"), getcommandkey("next weapon", "weapnext"), getcommandkey("previous weapon", "weapprev")); - drawInfoMessage(s) + drawInfoMessage(s); if(spectatee_status == -1) s = sprintf(_("^1Use ^3%s^1 or ^3%s^1 to change the speed"), getcommandkey("next weapon", "weapnext"), getcommandkey("previous weapon", "weapprev")); else s = sprintf(_("^1Press ^3%s^1 to observe"), getcommandkey("secondary fire", "+fire2")); - drawInfoMessage(s) + drawInfoMessage(s); s = sprintf(_("^1Press ^3%s^1 for gamemode info"), getcommandkey("server info", "+show_info")); - drawInfoMessage(s) + drawInfoMessage(s); if(gametype == MAPINFO_TYPE_LMS) { @@ -3716,7 +3718,7 @@ void HUD_InfoMessages(void) } else s = sprintf(_("^1Press ^3%s^1 to join"), getcommandkey("jump", "+jump")); - drawInfoMessage(s) + drawInfoMessage(s); //show restart countdown: if (time < getstatf(STAT_GAMESTARTTIME)) { @@ -3731,7 +3733,7 @@ void HUD_InfoMessages(void) if(warmup_stage && !intermission) { s = _("^2Currently in ^1warmup^2 stage!"); - drawInfoMessage(s) + drawInfoMessage(s); } string blinkcolor; @@ -3756,12 +3758,12 @@ void HUD_InfoMessages(void) else s = _("^2Waiting for others to ready up..."); } - drawInfoMessage(s) + drawInfoMessage(s); } else if(warmup_stage && !intermission && !spectatee_status) { s = sprintf(_("^2Press ^3%s^2 to end warmup"), getcommandkey("ready", "ready")); - drawInfoMessage(s) + drawInfoMessage(s); } if(teamplay && !intermission && !spectatee_status && gametype != MAPINFO_TYPE_CA && teamnagger) @@ -3787,7 +3789,7 @@ void HUD_InfoMessages(void) if (tm.team != NUM_SPECTATOR) if (tm.team_size == ts_max) s = strcat(s, sprintf(_(" Press ^3%s%s to adjust"), getcommandkey("team menu", "menu_showteamselect"), blinkcolor)); - drawInfoMessage(s) + drawInfoMessage(s); } } } @@ -3795,13 +3797,13 @@ void HUD_InfoMessages(void) else { s = _("^7Press ^3ESC ^7to show HUD options."); - drawInfoMessage(s) + drawInfoMessage(s); s = _("^3Doubleclick ^7a panel for panel-specific options."); - drawInfoMessage(s) + drawInfoMessage(s); s = _("^3CTRL ^7to disable collision testing, ^3SHIFT ^7and"); - drawInfoMessage(s) + drawInfoMessage(s); s = _("^3ALT ^7+ ^3ARROW KEYS ^7for fine adjustments."); - drawInfoMessage(s) + drawInfoMessage(s); } } diff --git a/qcsrc/client/laser.qc b/qcsrc/client/laser.qc index 861011f3b..d6a3d7d9c 100644 --- a/qcsrc/client/laser.qc +++ b/qcsrc/client/laser.qc @@ -19,7 +19,7 @@ void Draw_Laser() { if(self.count & 0x10) { - trace_endpos = self.velocity, + trace_endpos = self.velocity; trace_dphitq3surfaceflags = 0; } else diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index a07ad14f9..fcc248220 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -320,28 +320,29 @@ void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theSc drawpic_aspect_skin_expanding(position, pic, theScale, rgb, theAlpha, flag, fadelerp); drawpic_skin(position, pic, theScale, rgb, theAlpha * fadelerp, flag); } -#define SET_POS_AND_SZ_Y_ASPECT(allow_colors)\ - float textaspect, oldsz;\ - textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y;\ - if(sz.x/sz.y > textaspect) {\ - oldsz = sz.x;\ - sz_x = sz.y * textaspect;\ - pos.x += (oldsz - sz.x) * 0.5;\ - } else {\ - oldsz = sz.y;\ - sz_y = sz.x / textaspect; \ - pos.y += (oldsz - sz.y) * 0.5;\ - } +#define SET_POS_AND_SZ_Y_ASPECT(allow_colors) do { \ + float textaspect, oldsz; \ + textaspect = stringwidth(text, allow_colors, '1 1 1' * sz.y) / sz.y; \ + if(sz.x/sz.y > textaspect) { \ + oldsz = sz.x; \ + sz_x = sz.y * textaspect; \ + pos.x += (oldsz - sz.x) * 0.5; \ + } else { \ + oldsz = sz.y; \ + sz_y = sz.x / textaspect; \ + pos.y += (oldsz - sz.y) * 0.5; \ + } \ +} while(0) // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag) { - SET_POS_AND_SZ_Y_ASPECT(false) + SET_POS_AND_SZ_Y_ASPECT(false); drawstring(pos, text, '1 1 0' * sz.y, color, theAlpha, drawflag); } // drawstring wrapper to draw a colorcodedstring as large as possible with preserved aspect ratio into a box void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float theAlpha, float drawflag) { - SET_POS_AND_SZ_Y_ASPECT(true) + SET_POS_AND_SZ_Y_ASPECT(true); drawcolorcodedstring(pos, text, '1 1 0' * sz.y, theAlpha, drawflag); } @@ -362,7 +363,7 @@ void drawstring_expanding(vector position, string text, vector theScale, vector // drawstring wrapper to draw a string as large as possible with preserved aspect ratio into a box void drawstring_aspect_expanding(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag, float fadelerp) { - SET_POS_AND_SZ_Y_ASPECT(false) + SET_POS_AND_SZ_Y_ASPECT(false); drawstring_expanding(pos, text, '1 1 0' * sz.y, color, theAlpha, drawflag, fadelerp); } @@ -378,7 +379,7 @@ void drawcolorcodedstring_expanding(vector position, string text, vector theScal } void drawcolorcodedstring_aspect_expanding(vector pos, string text, vector sz, float theAlpha, float drawflag, float fadelerp) { - SET_POS_AND_SZ_Y_ASPECT(true) + SET_POS_AND_SZ_Y_ASPECT(true); drawcolorcodedstring_expanding(pos, text, '1 1 0' * sz.y, theAlpha, drawflag, fadelerp); } diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index d6b913a18..0eeb7f7b4 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -643,7 +643,7 @@ void GenericCommand_macro_help() #define GENERIC_COMMAND(name,function,description) \ { print(" ^2", name, "^7: ", description, "\n"); } - GENERIC_COMMANDS(0, 0, "") + GENERIC_COMMANDS(0, 0, ""); #undef GENERIC_COMMAND return; @@ -654,7 +654,7 @@ float GenericCommand_macro_command(float argc, string command) #define GENERIC_COMMAND(name,function,description) \ { if(name == strtolower(argv(0))) { function; return true; } } - GENERIC_COMMANDS(CMD_REQUEST_COMMAND, argc, command) + GENERIC_COMMANDS(CMD_REQUEST_COMMAND, argc, command); #undef GENERIC_COMMAND return false; @@ -665,7 +665,7 @@ float GenericCommand_macro_usage(float argc) #define GENERIC_COMMAND(name,function,description) \ { if(name == strtolower(argv(1))) { function; return true; } } - GENERIC_COMMANDS(CMD_REQUEST_USAGE, argc, "") + GENERIC_COMMANDS(CMD_REQUEST_USAGE, argc, ""); #undef GENERIC_COMMAND return false; @@ -676,7 +676,7 @@ void GenericCommand_macro_write_aliases(float fh) #define GENERIC_COMMAND(name,function,description) \ { CMD_Write_Alias("qc_cmd_svmenu", name, description); } - GENERIC_COMMANDS(0, 0, "") + GENERIC_COMMANDS(0, 0, ""); #undef GENERIC_COMMAND return; diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index dbe01f40f..9391c6bc7 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -226,13 +226,14 @@ void Destroy_All_Notifications(void) entity notif; int i; - #define DESTROY_LOOP(type,count) \ + #define DESTROY_LOOP(type,count) do { \ for(i = 1; i <= count; ++i) \ { \ notif = Get_Notif_Ent(type, i); \ if (!notif) { backtrace("Destroy_All_Notifications(): Missing notification entity!\n"); return; } \ Destroy_Notification_Entity(notif); \ - } + } \ + } while(0) // kill all networked notifications and centerprints #ifdef SVQC @@ -242,11 +243,11 @@ void Destroy_All_Notifications(void) #endif // kill all real notification entities - DESTROY_LOOP(MSG_ANNCE, NOTIF_ANNCE_COUNT) - DESTROY_LOOP(MSG_INFO, NOTIF_INFO_COUNT) - DESTROY_LOOP(MSG_CENTER, NOTIF_CENTER_COUNT) - DESTROY_LOOP(MSG_MULTI, NOTIF_MULTI_COUNT) - DESTROY_LOOP(MSG_CHOICE, NOTIF_CHOICE_COUNT) + DESTROY_LOOP(MSG_ANNCE, NOTIF_ANNCE_COUNT); + DESTROY_LOOP(MSG_INFO, NOTIF_INFO_COUNT); + DESTROY_LOOP(MSG_CENTER, NOTIF_CENTER_COUNT); + DESTROY_LOOP(MSG_MULTI, NOTIF_MULTI_COUNT); + DESTROY_LOOP(MSG_CHOICE, NOTIF_CHOICE_COUNT); #undef DESTROY_LOOP } @@ -722,7 +723,7 @@ void Create_Notification_Entity( // ====================== // Process Notif String // ====================== - #define SET_NOTIF_STRING(string,stringname) \ + #define SET_NOTIF_STRING(string,stringname) do { \ notif.nent_string = strzone(CCR( \ Process_Notif_Line( \ typeId, \ @@ -732,15 +733,15 @@ void Create_Notification_Entity( namestring, \ stringname \ )) \ - ); + ); \ + } while(0) if(GENTLE) { - if(gentle != "") { SET_NOTIF_STRING(gentle, "GENTLE") } - else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL") } + if(gentle != "") { SET_NOTIF_STRING(gentle, "GENTLE"); } + else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL"); } } - else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL") } - + else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL"); } #undef SET_NOTIF_STRING // Check to make sure a string was chosen @@ -1209,7 +1210,7 @@ string Local_Notification_sprintf( for(sel_num = 0;(args != "");) { selected = car(args); args = cdr(args); - NOTIF_HIT_MAX(NOTIF_MAX_ARGS, "Local_Notification_sprintf") + NOTIF_HIT_MAX(NOTIF_MAX_ARGS, "Local_Notification_sprintf"); switch(strtolower(selected)) { #ifdef CSQC @@ -1324,7 +1325,7 @@ void Local_Notification_HUD_Notify_Push( for(sel_num = 0;(hudargs != "");) { selected = car(hudargs); hudargs = cdr(hudargs); - NOTIF_HIT_MAX(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push") + NOTIF_HIT_MAX(NOTIF_MAX_HUDARGS, "Local_Notification_HUD_Notify_Push"); switch(strtolower(selected)) { #define ARG_CASE_ARG_CS_SV_HA(selected,result) case selected: { arg_slot[sel_num] = result; ++sel_num; break; } @@ -1369,7 +1370,7 @@ void Local_Notification_centerprint_generic( for(sel_num = 0;(durcnt != "");) { selected = car(durcnt); durcnt = cdr(durcnt); - NOTIF_HIT_MAX(NOTIF_MAX_DURCNT, "Local_Notification_centerprint_generic") + NOTIF_HIT_MAX(NOTIF_MAX_DURCNT, "Local_Notification_centerprint_generic"); switch(strtolower(selected)) { #define ARG_CASE_ARG_CS_SV_HA(selected,result) diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index e4e0ce7fa..cc529f84f 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -1068,7 +1068,9 @@ const float ARG_DC = 6; // unique result to durcnt/centerprint ARG_CASE(ARG_SV, "death_team", Team_ColoredFullName(f1)) \ ARG_CASE(ARG_CS, "death_team", Team_ColoredFullName(f1 - 1)) -#define NOTIF_HIT_MAX(count,funcname) if(sel_num == count) { backtrace(sprintf("%s: Hit maximum arguments!\n", funcname)); break; } +#define NOTIF_HIT_MAX(count,funcname) do { \ + if(sel_num == count) { backtrace(sprintf("%s: Hit maximum arguments!\n", funcname)); break; } \ +} while(0) #define NOTIF_HIT_UNKNOWN(token,funcname) { backtrace(sprintf("%s: Hit unknown token in selected string! '%s'\n", funcname, selected)); break; } #define KILL_SPREE_LIST \ diff --git a/qcsrc/common/weapons/config.qc b/qcsrc/common/weapons/config.qc index 2537022f6..3a41d094f 100644 --- a/qcsrc/common/weapons/config.qc +++ b/qcsrc/common/weapons/config.qc @@ -36,9 +36,9 @@ void Dump_Weapon_Settings(void) i, WEP_NAME(i), (((get_weaponinfo(i)).spawnflags & WEP_FLAG_MUTATORBLOCKED) ? " (MUTATOR WEAPON)" : "") - )) - for(x = 0; x <= WEP_CONFIG_COUNT; ++x) { WEP_CONFIG_WRITETOFILE(wep_config_queue[x]) } - WEP_CONFIG_WRITETOFILE("// }}}\n") + )); + for(x = 0; x <= WEP_CONFIG_COUNT; ++x) { WEP_CONFIG_WRITETOFILE(wep_config_queue[x]); } + WEP_CONFIG_WRITETOFILE("// }}}\n"); // step 5: debug info print(sprintf("#%d: %s: %d settings...\n", i, WEP_NAME(i), WEP_CONFIG_COUNT)); diff --git a/qcsrc/common/weapons/config.qh b/qcsrc/common/weapons/config.qh index efef821d8..4412c0c6c 100644 --- a/qcsrc/common/weapons/config.qh +++ b/qcsrc/common/weapons/config.qh @@ -14,9 +14,10 @@ string wep_config_queue[MAX_WEP_CONFIG]; wep_config_queue[WEP_CONFIG_COUNT] = a; \ ++WEP_CONFIG_COUNT; } -#define WEP_CONFIG_WRITETOFILE(a) { \ +#define WEP_CONFIG_WRITETOFILE(a) do { \ fputs(wep_config_file, a); \ - if(wep_config_alsoprint) { print(a); } } + if(wep_config_alsoprint) { print(a); } \ +} while(0) #define WEP_CONFIG_WRITE_CVARS_NONE(wepname,name) \ { WEP_CONFIG_QUEUE( \ diff --git a/qcsrc/common/weapons/w_arc.qc b/qcsrc/common/weapons/w_arc.qc index 25cc17daa..2b25afa4e 100644 --- a/qcsrc/common/weapons/w_arc.qc +++ b/qcsrc/common/weapons/w_arc.qc @@ -732,7 +732,7 @@ float W_Arc(float req) arc_shotorigin[2] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), false, false, 3); arc_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC), false, false, 4); } - ARC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + ARC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -746,7 +746,7 @@ float W_Arc(float req) } case WR_CONFIG: { - ARC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + ARC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_KILLMESSAGE: diff --git a/qcsrc/common/weapons/w_blaster.qc b/qcsrc/common/weapons/w_blaster.qc index 8b1b6ba98..4fe6c156c 100644 --- a/qcsrc/common/weapons/w_blaster.qc +++ b/qcsrc/common/weapons/w_blaster.qc @@ -230,7 +230,7 @@ float W_Blaster(float request) precache_model("models/weapons/v_laser.md3"); precache_model("models/weapons/h_laser.iqm"); precache_sound("weapons/lasergun_fire.wav"); - BLASTER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + BLASTER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } @@ -248,7 +248,7 @@ float W_Blaster(float request) case WR_CONFIG: { - BLASTER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + BLASTER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } diff --git a/qcsrc/common/weapons/w_crylink.qc b/qcsrc/common/weapons/w_crylink.qc index 70efdc0e2..0aa59b1d5 100644 --- a/qcsrc/common/weapons/w_crylink.qc +++ b/qcsrc/common/weapons/w_crylink.qc @@ -643,7 +643,7 @@ float W_Crylink(float req) precache_sound("weapons/crylink_fire.wav"); precache_sound("weapons/crylink_fire2.wav"); precache_sound("weapons/crylink_linkjoin.wav"); - CRYLINK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + CRYLINK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -668,7 +668,7 @@ float W_Crylink(float req) } case WR_CONFIG: { - CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RELOAD: diff --git a/qcsrc/common/weapons/w_devastator.qc b/qcsrc/common/weapons/w_devastator.qc index e49eb60ac..8286ec1d3 100644 --- a/qcsrc/common/weapons/w_devastator.qc +++ b/qcsrc/common/weapons/w_devastator.qc @@ -574,7 +574,7 @@ float W_Devastator(float req) precache_sound("weapons/rocket_fire.wav"); precache_sound("weapons/rocket_mode.wav"); //} - DEVASTATOR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + DEVASTATOR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_SETUP: @@ -624,7 +624,7 @@ float W_Devastator(float req) } case WR_CONFIG: { - DEVASTATOR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + DEVASTATOR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RESETPLAYER: diff --git a/qcsrc/common/weapons/w_electro.qc b/qcsrc/common/weapons/w_electro.qc index 2c0267d95..8e567efaf 100644 --- a/qcsrc/common/weapons/w_electro.qc +++ b/qcsrc/common/weapons/w_electro.qc @@ -505,7 +505,7 @@ float W_Electro(float req) precache_sound("weapons/electro_fire2.wav"); precache_sound("weapons/electro_impact.wav"); precache_sound("weapons/electro_impact_combo.wav"); - ELECTRO_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + ELECTRO_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -530,7 +530,7 @@ float W_Electro(float req) } case WR_CONFIG: { - ELECTRO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + ELECTRO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RESETPLAYER: diff --git a/qcsrc/common/weapons/w_fireball.qc b/qcsrc/common/weapons/w_fireball.qc index 39d5832f1..bdef5af5b 100644 --- a/qcsrc/common/weapons/w_fireball.qc +++ b/qcsrc/common/weapons/w_fireball.qc @@ -405,7 +405,7 @@ float W_Fireball(float req) precache_sound("weapons/fireball_fire.wav"); precache_sound("weapons/fireball_fire2.wav"); precache_sound("weapons/fireball_prefire2.wav"); - FIREBALL_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + FIREBALL_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_SETUP: @@ -420,7 +420,7 @@ float W_Fireball(float req) } case WR_CONFIG: { - FIREBALL_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + FIREBALL_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RESETPLAYER: diff --git a/qcsrc/common/weapons/w_hagar.qc b/qcsrc/common/weapons/w_hagar.qc index 26bc5dbe0..4289efd7d 100644 --- a/qcsrc/common/weapons/w_hagar.qc +++ b/qcsrc/common/weapons/w_hagar.qc @@ -451,7 +451,7 @@ float W_Hagar(float req) precache_sound("weapons/hagar_fire.wav"); precache_sound("weapons/hagar_load.wav"); precache_sound("weapons/hagar_beep.wav"); - HAGAR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + HAGAR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_SETUP: @@ -480,7 +480,7 @@ float W_Hagar(float req) } case WR_CONFIG: { - HAGAR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + HAGAR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RESETPLAYER: diff --git a/qcsrc/common/weapons/w_hlac.qc b/qcsrc/common/weapons/w_hlac.qc index 8fdefd32a..c4e80a4a4 100644 --- a/qcsrc/common/weapons/w_hlac.qc +++ b/qcsrc/common/weapons/w_hlac.qc @@ -244,7 +244,7 @@ float W_HLAC(float req) precache_model("models/weapons/v_hlac.md3"); precache_model("models/weapons/h_hlac.iqm"); precache_sound("weapons/lasergun_fire.wav"); - HLAC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + HLAC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -261,7 +261,7 @@ float W_HLAC(float req) } case WR_CONFIG: { - HLAC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + HLAC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RELOAD: diff --git a/qcsrc/common/weapons/w_hmg.qc b/qcsrc/common/weapons/w_hmg.qc index ac4ec39a3..ada439e8e 100644 --- a/qcsrc/common/weapons/w_hmg.qc +++ b/qcsrc/common/weapons/w_hmg.qc @@ -122,7 +122,7 @@ float W_HeavyMachineGun(float req) precache_model ("models/weapons/v_ok_hmg.md3"); precache_model ("models/weapons/h_ok_hmg.iqm"); precache_sound ("weapons/uzi_fire.wav"); - HMG_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + HMG_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -145,7 +145,7 @@ float W_HeavyMachineGun(float req) } case WR_CONFIG: { - HMG_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + HMG_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RELOAD: diff --git a/qcsrc/common/weapons/w_hook.qc b/qcsrc/common/weapons/w_hook.qc index 8ea84912a..976c396b0 100644 --- a/qcsrc/common/weapons/w_hook.qc +++ b/qcsrc/common/weapons/w_hook.qc @@ -293,7 +293,7 @@ float W_Hook(float req) precache_sound("weapons/hook_impact.wav"); // done by g_hook.qc precache_sound("weapons/hook_fire.wav"); precache_sound("weapons/hookbomb_fire.wav"); - HOOK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + HOOK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_SETUP: @@ -315,7 +315,7 @@ float W_Hook(float req) } case WR_CONFIG: { - HOOK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + HOOK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RESETPLAYER: diff --git a/qcsrc/common/weapons/w_machinegun.qc b/qcsrc/common/weapons/w_machinegun.qc index 4494e3ed3..4ff30d698 100644 --- a/qcsrc/common/weapons/w_machinegun.qc +++ b/qcsrc/common/weapons/w_machinegun.qc @@ -308,7 +308,7 @@ float W_MachineGun(float req) precache_model("models/weapons/v_uzi.md3"); precache_model("models/weapons/h_uzi.iqm"); precache_sound("weapons/uzi_fire.wav"); - MACHINEGUN_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + MACHINEGUN_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -345,7 +345,7 @@ float W_MachineGun(float req) } case WR_CONFIG: { - MACHINEGUN_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + MACHINEGUN_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RELOAD: diff --git a/qcsrc/common/weapons/w_minelayer.qc b/qcsrc/common/weapons/w_minelayer.qc index b410898d5..790dbe047 100644 --- a/qcsrc/common/weapons/w_minelayer.qc +++ b/qcsrc/common/weapons/w_minelayer.qc @@ -542,7 +542,7 @@ float W_MineLayer(float req) precache_sound("weapons/mine_fire.wav"); precache_sound("weapons/mine_stick.wav"); precache_sound("weapons/mine_trigger.wav"); - MINELAYER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + MINELAYER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -565,7 +565,7 @@ float W_MineLayer(float req) } case WR_CONFIG: { - MINELAYER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + MINELAYER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RESETPLAYER: diff --git a/qcsrc/common/weapons/w_mortar.qc b/qcsrc/common/weapons/w_mortar.qc index 669ffbe7c..3b1dde49e 100644 --- a/qcsrc/common/weapons/w_mortar.qc +++ b/qcsrc/common/weapons/w_mortar.qc @@ -415,7 +415,7 @@ float W_Mortar(float req) precache_sound("weapons/grenade_bounce6.wav"); precache_sound("weapons/grenade_stick.wav"); precache_sound("weapons/grenade_fire.wav"); - MORTAR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + MORTAR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -432,7 +432,7 @@ float W_Mortar(float req) } case WR_CONFIG: { - MORTAR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + MORTAR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RELOAD: diff --git a/qcsrc/common/weapons/w_porto.qc b/qcsrc/common/weapons/w_porto.qc index 7011d80de..a5c95aa40 100644 --- a/qcsrc/common/weapons/w_porto.qc +++ b/qcsrc/common/weapons/w_porto.qc @@ -305,7 +305,7 @@ float W_Porto(float req) } case WR_CONFIG: { - PORTO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + PORTO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_THINK: @@ -378,7 +378,7 @@ float W_Porto(float req) precache_sound("porto/explode.wav"); precache_sound("porto/fire.wav"); precache_sound("porto/unsupported.wav"); - PORTO_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + PORTO_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_SETUP: diff --git a/qcsrc/common/weapons/w_rifle.qc b/qcsrc/common/weapons/w_rifle.qc index 0424b16dd..aa3c74af9 100644 --- a/qcsrc/common/weapons/w_rifle.qc +++ b/qcsrc/common/weapons/w_rifle.qc @@ -208,7 +208,7 @@ float W_Rifle(float req) precache_model("models/weapons/h_campingrifle.iqm"); precache_sound("weapons/campingrifle_fire.wav"); precache_sound("weapons/campingrifle_fire2.wav"); - RIFLE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + RIFLE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -225,7 +225,7 @@ float W_Rifle(float req) } case WR_CONFIG: { - RIFLE_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + RIFLE_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RESETPLAYER: diff --git a/qcsrc/common/weapons/w_rpc.qc b/qcsrc/common/weapons/w_rpc.qc index 9cba90f68..b073a3170 100644 --- a/qcsrc/common/weapons/w_rpc.qc +++ b/qcsrc/common/weapons/w_rpc.qc @@ -186,7 +186,7 @@ float W_RocketPropelledChainsaw(float req) precache_model("models/weapons/v_ok_rl.md3"); precache_model("models/weapons/g_ok_rl.md3"); precache_sound ("weapons/rocket_fire.wav"); - RPC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + RPC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -201,7 +201,7 @@ float W_RocketPropelledChainsaw(float req) } case WR_CONFIG: { - RPC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + RPC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RELOAD: diff --git a/qcsrc/common/weapons/w_seeker.qc b/qcsrc/common/weapons/w_seeker.qc index 8af147f29..45a121ab4 100644 --- a/qcsrc/common/weapons/w_seeker.qc +++ b/qcsrc/common/weapons/w_seeker.qc @@ -668,7 +668,7 @@ float W_Seeker(float req) precache_sound("weapons/tag_fire.wav"); precache_sound("weapons/flac_fire.wav"); precache_sound("weapons/seeker_fire.wav"); - SEEKER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + SEEKER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -701,7 +701,7 @@ float W_Seeker(float req) } case WR_CONFIG: { - SEEKER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + SEEKER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RELOAD: diff --git a/qcsrc/common/weapons/w_shockwave.qc b/qcsrc/common/weapons/w_shockwave.qc index e6653f7fa..7311c6e00 100644 --- a/qcsrc/common/weapons/w_shockwave.qc +++ b/qcsrc/common/weapons/w_shockwave.qc @@ -716,7 +716,7 @@ float W_Shockwave(float req) precache_sound("misc/itempickup.wav"); precache_sound("weapons/lasergun_fire.wav"); precache_sound("weapons/shotgun_melee.wav"); - SHOCKWAVE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + SHOCKWAVE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -727,7 +727,7 @@ float W_Shockwave(float req) } case WR_CONFIG: { - SHOCKWAVE_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + SHOCKWAVE_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_SUICIDEMESSAGE: diff --git a/qcsrc/common/weapons/w_shotgun.qc b/qcsrc/common/weapons/w_shotgun.qc index 67b3d2652..7f54543cd 100644 --- a/qcsrc/common/weapons/w_shotgun.qc +++ b/qcsrc/common/weapons/w_shotgun.qc @@ -292,7 +292,7 @@ float W_Shotgun(float req) precache_sound("misc/itempickup.wav"); precache_sound("weapons/shotgun_fire.wav"); precache_sound("weapons/shotgun_melee.wav"); - SHOTGUN_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + SHOTGUN_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_SETUP: @@ -325,7 +325,7 @@ float W_Shotgun(float req) } case WR_CONFIG: { - SHOTGUN_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + SHOTGUN_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RELOAD: diff --git a/qcsrc/common/weapons/w_tuba.qc b/qcsrc/common/weapons/w_tuba.qc index 6806bf133..54959949a 100644 --- a/qcsrc/common/weapons/w_tuba.qc +++ b/qcsrc/common/weapons/w_tuba.qc @@ -423,7 +423,7 @@ float W_Tuba(float req) precache_model("models/weapons/h_akordeon.iqm"); precache_model("models/weapons/v_kleinbottle.md3"); precache_model("models/weapons/h_kleinbottle.iqm"); - TUBA_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + TUBA_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_SETUP: @@ -467,7 +467,7 @@ float W_Tuba(float req) } case WR_CONFIG: { - TUBA_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + TUBA_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_SUICIDEMESSAGE: diff --git a/qcsrc/common/weapons/w_vaporizer.qc b/qcsrc/common/weapons/w_vaporizer.qc index 9472e8011..869c8ec7c 100644 --- a/qcsrc/common/weapons/w_vaporizer.qc +++ b/qcsrc/common/weapons/w_vaporizer.qc @@ -195,7 +195,7 @@ float W_Vaporizer(float req) precache_sound("weapons/nexwhoosh2.wav"); precache_sound("weapons/nexwhoosh3.wav"); //W_Blaster(WR_INIT); // Samual: Is this really the proper thing to do? Didn't we already run this previously? - VAPORIZER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + VAPORIZER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_SETUP: @@ -220,7 +220,7 @@ float W_Vaporizer(float req) } case WR_CONFIG: { - VAPORIZER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + VAPORIZER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RESETPLAYER: diff --git a/qcsrc/common/weapons/w_vortex.qc b/qcsrc/common/weapons/w_vortex.qc index 2ab35a47b..f421786d8 100644 --- a/qcsrc/common/weapons/w_vortex.qc +++ b/qcsrc/common/weapons/w_vortex.qc @@ -251,7 +251,7 @@ float W_Vortex(float req) precache_sound("weapons/nexwhoosh1.wav"); precache_sound("weapons/nexwhoosh2.wav"); precache_sound("weapons/nexwhoosh3.wav"); - VORTEX_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP) + VORTEX_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP); return true; } case WR_CHECKAMMO1: @@ -276,7 +276,7 @@ float W_Vortex(float req) } case WR_CONFIG: { - VORTEX_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS) + VORTEX_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS); return true; } case WR_RELOAD: diff --git a/qcsrc/server/command/banning.qc b/qcsrc/server/command/banning.qc index 2838a2c29..aaf8f5ef6 100644 --- a/qcsrc/server/command/banning.qc +++ b/qcsrc/server/command/banning.qc @@ -273,7 +273,7 @@ void BanCommand_macro_help() #define BAN_COMMAND(name,function,description) \ { if(strtolower(description) != "") { print(" ^2", name, "^7: ", description, "\n"); } } - BAN_COMMANDS(0, 0, "") + BAN_COMMANDS(0, 0, ""); #undef BAN_COMMAND return; @@ -284,7 +284,7 @@ float BanCommand_macro_command(float argc, string command) #define BAN_COMMAND(name,function,description) \ { if(name == strtolower(argv(0))) { function; return true; } } - BAN_COMMANDS(CMD_REQUEST_COMMAND, argc, command) + BAN_COMMANDS(CMD_REQUEST_COMMAND, argc, command); #undef BAN_COMMAND return false; @@ -295,7 +295,7 @@ float BanCommand_macro_usage(float argc) #define BAN_COMMAND(name,function,description) \ { if(name == strtolower(argv(1))) { function; return true; } } - BAN_COMMANDS(CMD_REQUEST_USAGE, argc, "") + BAN_COMMANDS(CMD_REQUEST_USAGE, argc, ""); #undef BAN_COMMAND return false; @@ -306,7 +306,7 @@ void BanCommand_macro_write_aliases(float fh) #define BAN_COMMAND(name,function,description) \ { if(strtolower(description) != "") { CMD_Write_Alias("qc_cmd_sv", name, description); } } - BAN_COMMANDS(0, 0, "") + BAN_COMMANDS(0, 0, ""); #undef BAN_COMMAND return; diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 64ab85753..29f46c9cd 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -750,7 +750,7 @@ void ClientCommand_macro_help() #define CLIENT_COMMAND(name,function,description) \ { sprint(self, " ^2", name, "^7: ", description, "\n"); } - CLIENT_COMMANDS(0, 0, "") + CLIENT_COMMANDS(0, 0, ""); #undef CLIENT_COMMAND return; @@ -761,7 +761,7 @@ float ClientCommand_macro_command(float argc, string command) #define CLIENT_COMMAND(name,function,description) \ { if(name == strtolower(argv(0))) { function; return true; } } - CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc, command) + CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc, command); #undef CLIENT_COMMAND return false; @@ -772,7 +772,7 @@ float ClientCommand_macro_usage(float argc) #define CLIENT_COMMAND(name,function,description) \ { if(name == strtolower(argv(1))) { function; return true; } } - CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc, "") + CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc, ""); #undef CLIENT_COMMAND return false; @@ -783,7 +783,7 @@ void ClientCommand_macro_write_aliases(float fh) #define CLIENT_COMMAND(name,function,description) \ { CMD_Write_Alias("qc_cmd_cmd", name, description); } - CLIENT_COMMANDS(0, 0, "") + CLIENT_COMMANDS(0, 0, ""); #undef CLIENT_COMMAND return; diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 60ac9917a..323d232c7 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -689,7 +689,7 @@ void CommonCommand_macro_help(entity caller) #define COMMON_COMMAND(name,function,description) \ { print_to(caller, strcat(" ^2", name, "^7: ", description)); } - COMMON_COMMANDS(0, caller, 0, "") + COMMON_COMMANDS(0, caller, 0, ""); #undef COMMON_COMMAND return; @@ -700,7 +700,7 @@ float CommonCommand_macro_command(float argc, entity caller, string command) #define COMMON_COMMAND(name,function,description) \ { if(name == strtolower(argv(0))) { function; return true; } } - COMMON_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, command) + COMMON_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, command); #undef COMMON_COMMAND return false; @@ -711,7 +711,7 @@ float CommonCommand_macro_usage(float argc, entity caller) #define COMMON_COMMAND(name,function,description) \ { if(name == strtolower(argv(1))) { function; return true; } } - COMMON_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "") + COMMON_COMMANDS(CMD_REQUEST_USAGE, caller, argc, ""); #undef COMMON_COMMAND return false; @@ -722,7 +722,7 @@ void CommonCommand_macro_write_aliases(float fh) #define COMMON_COMMAND(name,function,description) \ { CMD_Write_Alias("qc_cmd_svcmd", name, description); } - COMMON_COMMANDS(0, world, 0, "") + COMMON_COMMANDS(0, world, 0, ""); #undef COMMON_COMMAND return; diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index c925b3894..63485d59c 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1815,7 +1815,7 @@ void GameCommand_macro_help() #define SERVER_COMMAND(name,function,description) \ { print(" ^2", name, "^7: ", description, "\n"); } - SERVER_COMMANDS(0, 0, "") + SERVER_COMMANDS(0, 0, ""); #undef SERVER_COMMAND return; @@ -1826,7 +1826,7 @@ float GameCommand_macro_command(float argc, string command) #define SERVER_COMMAND(name,function,description) \ { if(name == strtolower(argv(0))) { function; return true; } } - SERVER_COMMANDS(CMD_REQUEST_COMMAND, argc, command) + SERVER_COMMANDS(CMD_REQUEST_COMMAND, argc, command); #undef SERVER_COMMAND return false; @@ -1837,7 +1837,7 @@ float GameCommand_macro_usage(float argc) #define SERVER_COMMAND(name,function,description) \ { if(name == strtolower(argv(1))) { function; return true; } } - SERVER_COMMANDS(CMD_REQUEST_USAGE, argc, "") + SERVER_COMMANDS(CMD_REQUEST_USAGE, argc, ""); #undef SERVER_COMMAND return false; @@ -1848,7 +1848,7 @@ void GameCommand_macro_write_aliases(float fh) #define SERVER_COMMAND(name,function,description) \ { CMD_Write_Alias("qc_cmd_sv", name, description); } - SERVER_COMMANDS(0, 0, "") + SERVER_COMMANDS(0, 0, ""); #undef SERVER_COMMAND return; diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 7d9517d54..79925fc4e 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -1088,7 +1088,7 @@ void VoteCommand_macro_help(entity caller, float argc) #define VOTE_COMMAND(name,function,description,assignment) \ { if(Votecommand_check_assignment(caller, assignment)) { print_to(caller, strcat(" ^2", name, "^7: ", description)); } } - VOTE_COMMANDS(0, caller, 0, "") + VOTE_COMMANDS(0, caller, 0, ""); #undef VOTE_COMMAND print_to(caller, strcat("\nUsage:^3 ", command_origin, " vote COMMAND...^7, where possible commands are listed above.\n")); @@ -1100,7 +1100,7 @@ void VoteCommand_macro_help(entity caller, float argc) #define VOTE_COMMAND(name,function,description,assignment) \ { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(2))) { function; return; } } } - VOTE_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "") + VOTE_COMMANDS(CMD_REQUEST_USAGE, caller, argc, ""); #undef VOTE_COMMAND } @@ -1112,7 +1112,7 @@ float VoteCommand_macro_command(entity caller, float argc, string vote_command) #define VOTE_COMMAND(name,function,description,assignment) \ { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(1))) { function; return true; } } } - VOTE_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, vote_command) + VOTE_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, vote_command); #undef VOTE_COMMAND return false; -- 2.39.2