]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hook.qc
Revert e30214cf "Purge SetResourceAmountExplicit" because it breaks map vote and...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hook.qc
index da0daac945732ed3407c988ca49e2f9757768dcc..d8cebd740ac49fc3daf8ec2c5d5111e30f27a740 100644 (file)
@@ -54,7 +54,7 @@ void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage,
        if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
 
-       SetResource(this, RES_HEALTH, GetResource(this, RES_HEALTH));
+       SetResourceExplicit(this, RES_HEALTH, GetResource(this, RES_HEALTH));
 
        if(GetResource(this, RES_HEALTH) <= 0)
                W_PrepareExplosionByDamage(this, this.realowner, W_Hook_Explode2);
@@ -88,7 +88,7 @@ void W_Hook_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
        settouch(gren, W_Hook_Touch2);
 
        gren.takedamage = DAMAGE_YES;
-       SetResource(gren, RES_HEALTH, WEP_CVAR_SEC(hook, health));
+       SetResourceExplicit(gren, RES_HEALTH, WEP_CVAR_SEC(hook, health));
        gren.damageforcescale = WEP_CVAR_SEC(hook, damageforcescale);
        gren.event_damage = W_Hook_Damage;
        gren.damagedbycontents = true;