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;
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
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;
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);