]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/random_items/sv_random_items.qc
Added MUTATOR_IS_ENABLED macro.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / random_items / sv_random_items.qc
index 6afcd72e9cc2f8e3e2a558d7b5eff2e129aa50ab..2829e3ae2b8a70534134eefaeb6738f47123df4a 100644 (file)
@@ -55,11 +55,11 @@ string RandomItems_GetRandomItemClassNameWithProperty(string prefix,
 
 string RandomItems_GetRandomItemClassName(string prefix)
 {
-       if (autocvar_g_instagib)
+       if (MUTATOR_IS_ENABLED(mutator_instagib))
        {
                return RandomItems_GetRandomInstagibItemClassName(prefix);
        }
-       if (expr_evaluate(autocvar_g_overkill))
+       if (MUTATOR_IS_ENABLED(ok))
        {
                return RandomItems_GetRandomOverkillItemClassName(prefix);
        }
@@ -328,7 +328,7 @@ entity RandomItems_ReplaceMapItem(entity item)
        }
        random_items_is_spawning = true;
        entity new_item;
-       if (!expr_evaluate(autocvar_g_overkill))
+       if (!MUTATOR_IS_ENABLED(ok))
        {
                new_item = Item_Create(strzone(new_classname), item.origin,
                        Item_ShouldKeepPosition(item));
@@ -374,7 +374,7 @@ void RandomItems_SpawnLootItem(vector position)
        spread.z = autocvar_g_random_loot_spread / 2;
        spread += randomvec() * autocvar_g_random_loot_spread;
        random_items_is_spawning = true;
-       if (!expr_evaluate(autocvar_g_overkill))
+       if (!MUTATOR_IS_ENABLED(ok))
        {
                Item_CreateLoot(class_name, position, spread,
                        autocvar_g_random_loot_time);