From: TimePath Date: Fri, 30 Jan 2015 08:22:59 +0000 (+1100) Subject: Fix Uncrustify problem areas X-Git-Tag: xonotic-v0.8.1~133^2~7 X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=812b9d44a27f71f13c801e2efc1aae1aea223b95 Fix Uncrustify problem areas --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index bc84c6e66..ee8ef320a 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1358,18 +1358,20 @@ void CSQC_UpdateView(float w, float h) } } else + { #ifdef CAMERATEST - if(autocvar_camera_enable) + if(autocvar_camera_enable) #else - if(autocvar_camera_enable && isdemo()) + if(autocvar_camera_enable && isdemo()) #endif - { - // Enable required Darkplaces cvars - chase_active_backup = autocvar_chase_active; - cvar_set("chase_active", "2"); - cvar_set("cl_demo_mousegrab", "1"); - camera_active = true; - camera_mode = false; + { + // Enable required Darkplaces cvars + chase_active_backup = autocvar_chase_active; + cvar_set("chase_active", "2"); + cvar_set("cl_demo_mousegrab", "1"); + camera_active = true; + camera_mode = false; + } } // Draw the Crosshair diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 9e98c61d5..b48daec7b 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -2040,7 +2040,7 @@ void Send_Notification( // 2. Manually handling each separate call on per-usage basis (See old CTF usage of verbose) entity found_choice; - #define RECURSE_FROM_CHOICE(ent,action) \ + #define RECURSE_FROM_CHOICE(ent,action) do { \ if(notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) \ { \ switch(ent.msg_choice_choices[net_name - 1]) \ @@ -2059,22 +2059,29 @@ void Send_Notification( found_choice.nent_stringcount, \ found_choice.nent_floatcount, \ s1, s2, s3, s4, \ - f1, f2, f3, f4); + f1, f2, f3, f4); \ + } while(0) switch(broadcast) { case NOTIF_ONE_ONLY: // we can potentially save processing power with this broadcast method { if(IS_REAL_CLIENT(client)) - { RECURSE_FROM_CHOICE(client, return) } + { + RECURSE_FROM_CHOICE(client, return); + } break; } default: { entity to; FOR_EACH_REALCLIENT(to) - { if(Notification_ShouldSend(broadcast, to, client)) - { RECURSE_FROM_CHOICE(to, continue) } } + { + if(Notification_ShouldSend(broadcast, to, client)) + { + RECURSE_FROM_CHOICE(to, continue); + } + } break; } } diff --git a/qcsrc/server/command/banning.qh b/qcsrc/server/command/banning.qh index b4b251e9b..70daacc87 100644 --- a/qcsrc/server/command/banning.qh +++ b/qcsrc/server/command/banning.qh @@ -6,8 +6,8 @@ // Last updated: December 29th, 2011 // ===================================== -#define GET_BAN_ARG(v,d) if(argc > reason_arg) { if((v = stof(argv(reason_arg))) != 0) ++reason_arg; else v = d; } else v = d -#define GET_BAN_REASON(v,d) if(argc > reason_arg) v = substring(command, argv_start_index(reason_arg), strlen(command) - argv_start_index(reason_arg)); else v = d +#define GET_BAN_ARG(v,d) if(argc > reason_arg) { if((v = stof(argv(reason_arg))) != 0) ++reason_arg; else v = d; } else { v = d; } +#define GET_BAN_REASON(v,d) if(argc > reason_arg) v = substring(command, argv_start_index(reason_arg), strlen(command) - argv_start_index(reason_arg)); else v = d; void Ban_KickBanClient(entity client, float bantime, float masksize, string reason); void Ban_View();