]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_hook.qc
GetResourceAmount --> GetResource, SetResourceAmount --> SetResource
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_hook.qc
index ad45fa1fb99c283473bebc95495a39b47949f1e0..e00096344df75f1b4c8bf39354c4721f2ca1f1eb 100644 (file)
@@ -338,7 +338,7 @@ void GrapplingHookTouch(entity this, entity toucher)
 
 void GrapplingHook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
 {
-       if(GetResourceAmount(this, RES_HEALTH) <= 0)
+       if(GetResource(this, RES_HEALTH) <= 0)
                return;
 
        if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
@@ -346,7 +346,7 @@ void GrapplingHook_Damage(entity this, entity inflictor, entity attacker, float
 
        TakeResource(this, RES_HEALTH, damage);
 
-       if (GetResourceAmount(this, RES_HEALTH) <= 0)
+       if (GetResource(this, RES_HEALTH) <= 0)
        {
                if(attacker != this.realowner)
                {
@@ -397,7 +397,7 @@ void FireGrapplingHook(entity actor, .entity weaponentity)
 
        missile.effects = /*EF_FULLBRIGHT | EF_ADDITIVE |*/ EF_LOWPRECISION;
 
-       SetResourceAmount(missile, RES_HEALTH, autocvar_g_balance_grapplehook_health);
+       SetResource(missile, RES_HEALTH, autocvar_g_balance_grapplehook_health);
        missile.event_damage = GrapplingHook_Damage;
        missile.takedamage = DAMAGE_AIM;
        missile.damageforcescale = 0;