]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix Uncrustify problem areas
authorTimePath <andrew.hardaker1995@gmail.com>
Fri, 30 Jan 2015 08:22:59 +0000 (19:22 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Fri, 30 Jan 2015 08:30:18 +0000 (19:30 +1100)
qcsrc/client/view.qc
qcsrc/common/notifications.qc
qcsrc/server/command/banning.qh

index bc84c6e666b2f7a5acb67057428933ef13f9c3e1..ee8ef320ae4643740f8bb275f848b9436914462f 100644 (file)
@@ -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
index 9e98c61d53fda48288b7556d0d5419b9ecd17160..b48daec7bcec244b831d8a74129eee9bfae826a8 100644 (file)
@@ -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;
                        }
                }
index b4b251e9b672b65b1d5f4149be951ab9a31539b1..70daacc87ea98d6152b183dc6ea97b6fc0b30ef2 100644 (file)
@@ -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();