]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Random items: Fixed overkill detection.
authorLyberta <lyberta@lyberta.net>
Thu, 5 Oct 2017 21:31:48 +0000 (00:31 +0300)
committerLyberta <lyberta@lyberta.net>
Thu, 5 Oct 2017 21:31:48 +0000 (00:31 +0300)
qcsrc/common/mutators/mutator/random_items/sv_random_items.qc

index c33b42b86b8f1c9bc73e1de46afe0f1f4a1a4f1d..f470408f20df317d5c53e1ac1fa69af6c9933919 100644 (file)
@@ -781,7 +781,7 @@ string RandomItems_GetRandomMapItemClassName()
        {
                return RandomItems_GetRandomInstagibMapItemClassName();
        }
-       if (autocvar_g_overkill)
+       if (expr_evaluate(autocvar_g_overkill))
        {
                return RandomItems_GetRandomOverkillMapItemClassName();
        }
@@ -1116,7 +1116,7 @@ entity RandomItems_ReplaceMapItem(entity item)
        }
        random_items_is_spawning = true;
        entity new_item;
-       if (!autocvar_g_overkill)
+       if (!expr_evaluate(autocvar_g_overkill))
        {
                new_item = Item_Create(strzone(new_classname), item.origin);
        }
@@ -1247,7 +1247,7 @@ string RandomItems_GetRandomLootItemClassName()
        {
                return RandomItems_GetRandomInstagibLootItemClassName();
        }
-       if (autocvar_g_overkill)
+       if (expr_evaluate(autocvar_g_overkill))
        {
                return RandomItems_GetRandomOverkillLootItemClassName();
        }
@@ -1556,7 +1556,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 (!autocvar_g_overkill)
+       if (!expr_evaluate(autocvar_g_overkill))
        {
                Item_CreateLoot(class_name, position, spread,
                        autocvar_g_random_loot_time);