]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/devastator.qc
Implement TakeResource
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / devastator.qc
index d30569adf2e65d07508537901d055669997166c8..ab97e3d7f0b6c5c16ba538092b3ece2bd2aeb4df 100644 (file)
@@ -295,7 +295,7 @@ void W_Devastator_Damage(entity this, entity inflictor, entity attacker, float d
        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);
        this.angles = vectoangles(this.velocity);
 
        if(GetResourceAmount(this, RESOURCE_HEALTH) <= 0)