]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/overkill/okrpc.qc
Implement TakeResource
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / overkill / okrpc.qc
index c5c03640b3371bf1ad30b31efc3e692629f9477e..37d82e22ef72d9f1579d4056349bcf39f61d012a 100644 (file)
@@ -34,7 +34,7 @@ void W_OverkillRocketPropelledChainsaw_Damage(entity this, entity inflictor, ent
        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)
                W_PrepareExplosionByDamage(this, attacker, W_OverkillRocketPropelledChainsaw_Explode_think);