]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/config.qh
Introduce the shared function write_String_To_File that can be used by all the dump...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / config.qh
index ad3a0c72fefafc0da3b2c255052aadaafedcbd81..ad9c3846f9a239bd4a9f9eb75609732ca83a2a49 100644 (file)
@@ -1,29 +1,12 @@
-// ==========================
-//  Turret Config Generator
-// ==========================
+#pragma once
 
-void Dump_Turret_Settings(void);
+#ifdef SVQC
+
+void Dump_Turret_Settings();
 float tur_config_file;
 float tur_config_alsoprint;
 
-#define MAX_TUR_CONFIG 256
 float TUR_CONFIG_COUNT;
-string tur_config_queue[MAX_TUR_CONFIG];
-
-#define TUR_CONFIG_QUEUE(a) { \
-       tur_config_queue[TUR_CONFIG_COUNT] = a; \
-       ++TUR_CONFIG_COUNT; }
-
-#define TUR_CONFIG_WRITETOFILE(a) { \
-       fputs(tur_config_file, a); \
-       if(tur_config_alsoprint) { print(a); } }
 
-#define TUR_CONFIG_WRITE_CVARS(turret,name) \
-               { TUR_CONFIG_QUEUE( \
-                       sprintf("set g_turrets_unit_%s_%s %g\n", #turret, #name, \
-                       cvar(sprintf("g_turrets_unit_%s_%s", #turret, #name)))) } \
 
-#define TUR_CONFIG_SETTINGS(tursettings) \
-       #define TUR_ADD_CVAR(turret,name) TUR_CONFIG_WRITE_CVARS(turret,name) \
-       tursettings \
-       #undef TUR_ADD_CVAR
+#endif