]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/func/breakable.qc
Implement TakeResource
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / func / breakable.qc
index 05d643b464b465b2de8d33151f818c5247bc0815..cb17ac442cb4244aa71b708e6c7c27deaf220bb4 100644 (file)
@@ -272,7 +272,7 @@ void func_breakable_damage(entity this, entity inflictor, entity attacker, float
                if(attacker.team == this.team)
                        return;
        this.pain_finished = time;
-       SetResourceAmountExplicit(this, RESOURCE_HEALTH, GetResourceAmount(this, RESOURCE_HEALTH) - damage);
+       TakeResource(this, RESOURCE_HEALTH, damage);
        if(this.sprite)
        {
                WaypointSprite_Ping(this.sprite);