]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Compact 2 macros
authorterencehill <piuntn@gmail.com>
Thu, 11 Apr 2019 15:24:11 +0000 (17:24 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 11 Apr 2019 15:24:11 +0000 (17:24 +0200)
qcsrc/common/turrets/config.qh
qcsrc/common/weapons/config.qc
qcsrc/common/weapons/config.qh

index 2c47be09116de219715ec4c3bc9714d07972ed44..2741283817bab860483ba39f66806a0275813802 100644 (file)
@@ -1,15 +1,16 @@
 #pragma once
 
 #ifdef SVQC
 #pragma once
 
 #ifdef SVQC
+// ==========================
+//  Balance Config Generator
+// ==========================
 
 void Dump_Turret_Settings();
 float tur_config_file;
 float tur_config_alsoprint;
 
 float TUR_CONFIG_COUNT;
 
 void Dump_Turret_Settings();
 float tur_config_file;
 float tur_config_alsoprint;
 
 float TUR_CONFIG_COUNT;
-#define TUR_CONFIG_QUEUE(a) { \
-       config_queue[TUR_CONFIG_COUNT] = a; \
-       ++TUR_CONFIG_COUNT; }
+#define TUR_CONFIG_QUEUE(a) config_queue[TUR_CONFIG_COUNT++] = a;
 
 #define TUR_CONFIG_WRITE_CVARS(turname, name, T) TUR_CONFIG_WRITE_PROPS_##T(turname, name)
 
 
 #define TUR_CONFIG_WRITE_CVARS(turname, name, T) TUR_CONFIG_WRITE_PROPS_##T(turname, name)
 
index bf34d53208ae701375bdfef1bd3d8d41b5abf44e..f9ff6739310e02a6dd66181bca2d3561dd71590c 100644 (file)
@@ -48,7 +48,8 @@ void Dump_Weapon_Settings()
                        it.m_name,
                        ((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) ? " (MUTATOR WEAPON)" : "")
                ));
                        it.m_name,
                        ((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) ? " (MUTATOR WEAPON)" : "")
                ));
-               for (int x = 0; x <= WEP_CONFIG_COUNT; ++x) { WEP_CONFIG_WRITETOFILE(config_queue[x]); }
+               for (int x = 0; x <= WEP_CONFIG_COUNT; ++x)
+                       WEP_CONFIG_WRITETOFILE(config_queue[x]);
                WEP_CONFIG_WRITETOFILE("// }}}\n");
 
                // step 5: debug info
                WEP_CONFIG_WRITETOFILE("// }}}\n");
 
                // step 5: debug info
index b21bf017029dd45e329fa0cb4a9068d2110ead0e..26a37a7ce0b179f5719ab3b36758d1fe44920f9a 100644 (file)
@@ -10,10 +10,7 @@ int wep_config_file;
 bool wep_config_alsoprint;
 
 int WEP_CONFIG_COUNT;
 bool wep_config_alsoprint;
 
 int WEP_CONFIG_COUNT;
-#define WEP_CONFIG_QUEUE(a) { \
-       config_queue[WEP_CONFIG_COUNT] = a; \
-       ++WEP_CONFIG_COUNT; }
-
+#define WEP_CONFIG_QUEUE(a) config_queue[WEP_CONFIG_COUNT++] = a;
 
 #define WEP_CONFIG_WRITE_CVARS(wepname, name, T) WEP_CONFIG_WRITE_PROPS_##T(wepname, name)
 
 
 #define WEP_CONFIG_WRITE_CVARS(wepname, name, T) WEP_CONFIG_WRITE_PROPS_##T(wepname, name)