From: Lyberta Date: Thu, 5 Oct 2017 21:31:48 +0000 (+0300) Subject: Random items: Fixed overkill detection. X-Git-Tag: xonotic-v0.8.5~2426^2~43 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a5c8be4ad6206a778f3f172b58cfa1ca54d0d29d;p=xonotic%2Fxonotic-data.pk3dir.git Random items: Fixed overkill detection. --- diff --git a/qcsrc/common/mutators/mutator/random_items/sv_random_items.qc b/qcsrc/common/mutators/mutator/random_items/sv_random_items.qc index c33b42b86..f470408f2 100644 --- a/qcsrc/common/mutators/mutator/random_items/sv_random_items.qc +++ b/qcsrc/common/mutators/mutator/random_items/sv_random_items.qc @@ -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);