From: Lyberta Date: Mon, 2 Apr 2018 08:32:44 +0000 (+0300) Subject: Removed early return in SetResourceAmount so wasted amount is handled correctly. X-Git-Tag: xonotic-v0.8.5~2204^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9fe6337d16f2bc312e703c362745d4a05870e289;p=xonotic%2Fxonotic-data.pk3dir.git Removed early return in SetResourceAmount so wasted amount is handled correctly. --- diff --git a/qcsrc/server/resources.qc b/qcsrc/server/resources.qc index fc20caeba..e3a7b8679 100644 --- a/qcsrc/server/resources.qc +++ b/qcsrc/server/resources.qc @@ -91,10 +91,6 @@ void SetResourceAmount(entity e, int resource_type, float amount) amount = max_amount; } .float resource_field = GetResourceField(resource_type); - if (e.(resource_field) == amount) - { - return; - } e.(resource_field) = amount; MUTATOR_CALLHOOK(ResourceAmountChanged, e, resource_type, amount, amount_wasted);