From 5295642d74c83ac6b9cc173e91fba1dee0474770 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Sat, 26 Aug 2017 19:40:59 +0300 Subject: [PATCH] Return early in GivePlayerAmmo. --- qcsrc/common/t_items.qc | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.39.2