]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/electro.qc
Reduce name space of resource constants and variables (RESOURCE_* --> RES_*, resour...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / electro.qc
index b44731eab872e667711724ee74e5b75b57f6704c..134002426ce22e97f03e3e0d6215ae80f854b2f7 100644 (file)
@@ -258,7 +258,7 @@ void W_Electro_Orb_Stick(entity this, entity to)
 
        newproj.takedamage = this.takedamage;
        newproj.damageforcescale = this.damageforcescale;
 
        newproj.takedamage = this.takedamage;
        newproj.damageforcescale = this.damageforcescale;
-       SetResourceAmount(newproj, RESOURCE_HEALTH, GetResourceAmount(this, RESOURCE_HEALTH));
+       SetResourceAmount(newproj, RES_HEALTH, GetResourceAmount(this, RES_HEALTH));
        newproj.event_damage = this.event_damage;
        newproj.spawnshieldtime = this.spawnshieldtime;
        newproj.damagedbycontents = true;
        newproj.event_damage = this.event_damage;
        newproj.spawnshieldtime = this.spawnshieldtime;
        newproj.damagedbycontents = true;
@@ -300,7 +300,7 @@ void W_Electro_Orb_Touch(entity this, entity toucher)
 
 void W_Electro_Orb_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
 {
 
 void W_Electro_Orb_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;
 
        // note: combos are usually triggered by W_Electro_TriggerCombo, not damage
                return;
 
        // note: combos are usually triggered by W_Electro_TriggerCombo, not damage
@@ -309,8 +309,8 @@ void W_Electro_Orb_Damage(entity this, entity inflictor, entity attacker, float
        if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, (is_combo ? 1 : -1)))
                return; // g_projectiles_damage says to halt
 
        if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, (is_combo ? 1 : -1)))
                return; // g_projectiles_damage says to halt
 
-       TakeResource(this, RESOURCE_HEALTH, damage);
-       if(GetResourceAmount(this, RESOURCE_HEALTH) <= 0)
+       TakeResource(this, RES_HEALTH, damage);
+       if(GetResourceAmount(this, RES_HEALTH) <= 0)
        {
                this.takedamage = DAMAGE_NO;
                this.nextthink = time;
        {
                this.takedamage = DAMAGE_NO;
                this.nextthink = time;
@@ -381,7 +381,7 @@ void W_Electro_Attack_Orb(Weapon thiswep, entity actor, .entity weaponentity)
        setsize(proj, '-4 -4 -4', '4 4 4');
        proj.takedamage = DAMAGE_YES;
        proj.damageforcescale = WEP_CVAR_SEC(electro, damageforcescale);
        setsize(proj, '-4 -4 -4', '4 4 4');
        proj.takedamage = DAMAGE_YES;
        proj.damageforcescale = WEP_CVAR_SEC(electro, damageforcescale);
-       SetResourceAmount(proj, RESOURCE_HEALTH, WEP_CVAR_SEC(electro, health));
+       SetResourceAmount(proj, RES_HEALTH, WEP_CVAR_SEC(electro, health));
        proj.event_damage = W_Electro_Orb_Damage;
        proj.flags = FL_PROJECTILE;
        IL_PUSH(g_projectiles, proj);
        proj.event_damage = W_Electro_Orb_Damage;
        proj.flags = FL_PROJECTILE;
        IL_PUSH(g_projectiles, proj);