X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fall.qh;h=b82af599b0c5fec587b4a47ce6422bd291ee79e6;hb=b9b69ac8b85f0cf2cddc8ac370c90a03f1db5024;hp=e63a931a67361df15b0d7b15f71fbc16e484c862;hpb=f934b2c5771b8d509fb1114b4dd89d74776f248d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/all.qh b/qcsrc/common/turrets/all.qh index e63a931a6..b82af599b 100644 --- a/qcsrc/common/turrets/all.qh +++ b/qcsrc/common/turrets/all.qh @@ -11,6 +11,18 @@ REGISTRY(Turrets, BITS(5)) REGISTER_REGISTRY(Turrets) REGISTRY_CHECK(Turrets) +#define TR_PROPS(L, class, prefix) \ + L(TR_CONFIG_BEGIN, TR_CONFIG, TR_CONFIG_END, class, prefix) \ + /**/ \ + +#define TR_CONFIG(class, turname, fld, T) _TR_CONFIG(class, fld, T, turname) +#define TR_CONFIG_BEGIN(class) METHOD(class, tr_config, void(class this)) { + #ifdef SVQC + #define _TR_CONFIG(class, fld, T, turname) if (#turname == this.netname) TUR_CONFIG_WRITE_CVARS(turname, fld, T); + #else + #define _TR_CONFIG(class, fld, T, turname) + #endif +#define TR_CONFIG_END() } GENERIC_COMMAND(dumpturrets, "Dump all turrets into turrets_dump.txt") {