]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/arc.qc
Implement TakeResource
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / arc.qc
index 3b71d9207580baa0542b6b1176907686e78d8747..d6604623d2615ae31467d9592e0d7037c8557c6e 100644 (file)
@@ -110,7 +110,7 @@ void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float dam
        if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1))
                return; // g_projectiles_damage says to halt
 
-       SetResourceAmountExplicit(this, RESOURCE_HEALTH, GetResourceAmount(this, RESOURCE_HEALTH) - damage);
+       TakeResource(this, RESOURCE_HEALTH, damage);
        this.angles = vectoangles(this.velocity);
 
        if(GetResourceAmount(this, RESOURCE_HEALTH) <= 0)