]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/func/button.qc
Implement TakeResource
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / func / button.qc
index 4d9c93fd0de76cfdceb0cc7bae24e23990008c9a..44e31284336aae99eb35f580dff390b5db98797b 100644 (file)
@@ -104,7 +104,7 @@ void button_damage(entity this, entity inflictor, entity attacker, float damage,
        }
        else
        {
-               SetResourceAmountExplicit(this, RESOURCE_HEALTH, GetResourceAmount(this, RESOURCE_HEALTH) - damage);
+               TakeResource(this, RESOURCE_HEALTH, damage);
                if (GetResourceAmount(this, RESOURCE_HEALTH) <= 0)
                {
                        this.enemy = attacker;