]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_hook.qc
Reduce name space of resource constants and variables (RESOURCE_* --> RES_*, resour...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_hook.qc
index 226ab2f1a2c4beb30c0e1f3707ae77466ab4dca1..ad45fa1fb99c283473bebc95495a39b47949f1e0 100644 (file)
@@ -338,15 +338,15 @@ 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, RESOURCE_HEALTH) <= 0)
+       if(GetResourceAmount(this, RES_HEALTH) <= 0)
                return;
 
        if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
                return; // g_balance_projectiledamage says to halt
 
-       TakeResource(this, RESOURCE_HEALTH, damage);
+       TakeResource(this, RES_HEALTH, damage);
 
-       if (GetResourceAmount(this, RESOURCE_HEALTH) <= 0)
+       if (GetResourceAmount(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, RESOURCE_HEALTH, autocvar_g_balance_grapplehook_health);
+       SetResourceAmount(missile, RES_HEALTH, autocvar_g_balance_grapplehook_health);
        missile.event_damage = GrapplingHook_Damage;
        missile.takedamage = DAMAGE_AIM;
        missile.damageforcescale = 0;