From: Lyberta Date: Sat, 26 Aug 2017 16:40:59 +0000 (+0300) Subject: Return early in GivePlayerAmmo. X-Git-Tag: xonotic-v0.8.5~2499^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5295642d74c83ac6b9cc173e91fba1dee0474770;p=xonotic%2Fxonotic-data.pk3dir.git Return early in GivePlayerAmmo. --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 14a8f14bf..d1d2cb1d9 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -686,6 +686,10 @@ void GivePlayerArmor(entity player, float amount) void GivePlayerAmmo(entity player, .float ammotype, float amount) { + if (amount == 0) + { + return; + } float maxvalue = ITEM_COUNT_HARD_LIMIT; switch (ammotype) {