]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/fireball.qc
Implement TakeResource
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / fireball.qc
index 45a8c13d13981cd37bc317183747c409efd28203..84113b7020f210352d85360cfc5f6b0d6d488d61 100644 (file)
@@ -125,7 +125,7 @@ void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float dam
        if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
 
-       SetResourceAmountExplicit(this, RESOURCE_HEALTH, GetResourceAmount(this, RESOURCE_HEALTH) - damage);
+       TakeResource(this, RESOURCE_HEALTH, damage);
        if(GetResourceAmount(this, RESOURCE_HEALTH) <= 0)
        {
                this.cnt = 1;