]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/base.qh
Update default video settings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / base.qh
index c1d658576e2cb4b22e43a7e6446356312467265f..2b4d3e34cbe23f61c1bd84ed587dbe705b07edfe 100644 (file)
@@ -165,13 +165,15 @@ CLASS(Mutator, Object)
 ENDCLASS(Mutator)
 
 REGISTRY(Mutators, BITS(7))
-#define Mutators_from(i) _Mutators_from(i, NULL)
+
+REGISTRY_DEFINE_GET(Mutators, NULL)
 bool Mutator_Add(Mutator mut);
 void Mutator_Remove(Mutator mut);
 bool mutator_log = false;
 .bool m_added;
 
-#define MUTATOR_IS_ENABLED(this) MUTATOR_##this.mutatorcheck()
+#define _MUTATOR_IS_ENABLED(this) this.mutatorcheck()
+#define MUTATOR_IS_ENABLED(this) _MUTATOR_IS_ENABLED(MUTATOR_##this)
 
 #ifdef GAMEQC
 /** server mutators activate corresponding client mutators for all clients */
@@ -276,7 +278,7 @@ STATIC_INIT(Mutators) {
 }
 
 STATIC_INIT_LATE(Mutators) {
-    FOREACH(Mutators, it.mutatorcheck(), Mutator_Add(it));
+    FOREACH(Mutators, _MUTATOR_IS_ENABLED(it), Mutator_Add(it));
 }
 
 #define MUTATOR_ONADD                   if (mode == MUTATOR_ADDING)