]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/trigger/multi.qc
Implement TakeResource
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / trigger / multi.qc
index 31be111dbda8779516305b4fb0fcc8c0610c841f..5447b992c373e1c1694b7e5bacb926cd8953f2e9 100644 (file)
@@ -120,7 +120,7 @@ void multi_eventdamage(entity this, entity inflictor, entity attacker, float dam
        if(this.team)
                if(((this.spawnflags & INVERT_TEAMS) == 0) == (this.team != attacker.team))
                        return;
-       SetResourceAmountExplicit(this, RESOURCE_HEALTH, GetResourceAmount(this, RESOURCE_HEALTH) - damage);
+       TakeResource(this, RESOURCE_HEALTH, damage);
        if (GetResourceAmount(this, RESOURCE_HEALTH) <= 0)
        {
                this.enemy = attacker;