SetResourceAmountExplicit(teleporter, RESOURCE_HEALTH, autocvar_g_balance_portal_health);
SetResourceAmountExplicit(teleporter.enemy, RESOURCE_HEALTH, autocvar_g_balance_portal_health);
SetResourceAmountExplicit(teleporter, RESOURCE_HEALTH, autocvar_g_balance_portal_health);
SetResourceAmountExplicit(teleporter.enemy, RESOURCE_HEALTH, autocvar_g_balance_portal_health);
destination.enemy = teleporter;
Portal_MakeInPortal(teleporter);
Portal_MakeOutPortal(destination);
destination.enemy = teleporter;
Portal_MakeInPortal(teleporter);
Portal_MakeOutPortal(destination);
destination.fade_time = teleporter.fade_time;
teleporter.portal_wants_to_vanish = 0;
destination.portal_wants_to_vanish = 0;
destination.fade_time = teleporter.fade_time;
teleporter.portal_wants_to_vanish = 0;
destination.portal_wants_to_vanish = 0;
if(attacker != this.aiment)
if(IS_INDEPENDENT_PLAYER(attacker) || IS_INDEPENDENT_PLAYER(this.aiment))
return;
if(attacker != this.aiment)
if(IS_INDEPENDENT_PLAYER(attacker) || IS_INDEPENDENT_PLAYER(this.aiment))
return;
- SetResourceAmountExplicit(this, RESOURCE_HEALTH, GetResourceAmount(this, RESOURCE_HEALTH) - damage);
+ TakeResource(this, RESOURCE_HEALTH, damage);
portal.portal_activatetime = time + 0.1;
portal.takedamage = DAMAGE_AIM;
portal.event_damage = Portal_Damage;
portal.portal_activatetime = time + 0.1;
portal.takedamage = DAMAGE_AIM;
portal.event_damage = Portal_Damage;
SetResourceAmountExplicit(portal, RESOURCE_HEALTH, autocvar_g_balance_portal_health);
setmodel(portal, MDL_PORTAL);
portal.savemodelindex = portal.modelindex;
SetResourceAmountExplicit(portal, RESOURCE_HEALTH, autocvar_g_balance_portal_health);
setmodel(portal, MDL_PORTAL);
portal.savemodelindex = portal.modelindex;