]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Removed early return in SetResourceAmount so wasted amount is handled correctly.
authorLyberta <lyberta@lyberta.net>
Mon, 2 Apr 2018 08:32:44 +0000 (11:32 +0300)
committerLyberta <lyberta@lyberta.net>
Mon, 2 Apr 2018 08:32:44 +0000 (11:32 +0300)
qcsrc/server/resources.qc

index fc20caeba1fe6096bf4d7871ca33b4fecb810642..e3a7b867978b053c4911776da3b63b64e6604599 100644 (file)
@@ -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);