// reset fade counter
teleporter.portal_wants_to_vanish = 0;
teleporter.fade_time = ((autocvar_g_balance_portal_lifetime >= 0) ? time + autocvar_g_balance_portal_lifetime : 0);
- SetResourceAmount(teleporter, RES_HEALTH, autocvar_g_balance_portal_health);
- SetResourceAmount(teleporter.enemy, RES_HEALTH, autocvar_g_balance_portal_health);
+ SetResource(teleporter, RES_HEALTH, autocvar_g_balance_portal_health);
+ SetResource(teleporter.enemy, RES_HEALTH, autocvar_g_balance_portal_health);
return 1;
}
if(IS_INDEPENDENT_PLAYER(attacker) || IS_INDEPENDENT_PLAYER(this.aiment))
return;
TakeResource(this, RES_HEALTH, damage);
- if(GetResourceAmount(this, RES_HEALTH) < 0)
+ if(GetResource(this, RES_HEALTH) < 0)
Portal_Remove(this, 1);
}
portal.takedamage = DAMAGE_AIM;
portal.event_damage = Portal_Damage;
portal.fade_time = ((autocvar_g_balance_portal_lifetime >= 0) ? time + autocvar_g_balance_portal_lifetime : 0);
- SetResourceAmount(portal, RES_HEALTH, autocvar_g_balance_portal_health);
+ SetResource(portal, RES_HEALTH, autocvar_g_balance_portal_health);
setmodel(portal, MDL_PORTAL);
portal.savemodelindex = portal.modelindex;
setcefc(portal, Portal_Customize);