// reset fade counter
teleporter.portal_wants_to_vanish = 0;
- teleporter.fade_time = time + cvar("g_balance_portal_lifetime");
- teleporter.health = cvar("g_balance_portal_health");
- teleporter.enemy.health = cvar("g_balance_portal_health");
+ teleporter.fade_time = time + autocvar_g_balance_portal_lifetime;
+ teleporter.health = autocvar_g_balance_portal_health;
+ teleporter.enemy.health = autocvar_g_balance_portal_health;
return 1;
}
if(IS_INDEPENDENT_PLAYER(other.aiment) || IS_INDEPENDENT_PLAYER(self.aiment))
return; // cannot go through someone else's portal
fixedmakevectors(self.mangle);
- g = frametime * '0 0 -1' * cvar("sv_gravity");
+ g = frametime * '0 0 -1' * autocvar_sv_gravity;
if(!Portal_WillHitPlane(other.origin, other.mins, other.maxs, other.velocity + g, self.origin, v_forward, self.maxs_x))
return;
void Portal_Connect(entity teleporter, entity destination)
{
- teleporter.portal_transform = AnglesTransform_Divide(AnglesTransform_TurnDirectionFR(destination.mangle), teleporter.mangle);
+ teleporter.portal_transform = AnglesTransform_RightDivide(AnglesTransform_TurnDirectionFR(destination.mangle), teleporter.mangle);
teleporter.enemy = destination;
destination.enemy = teleporter;
Portal_MakeInPortal(teleporter);
Portal_MakeOutPortal(destination);
- teleporter.fade_time = time + cvar("g_balance_portal_lifetime");
+ teleporter.fade_time = time + autocvar_g_balance_portal_lifetime;
destination.fade_time = teleporter.fade_time;
teleporter.portal_wants_to_vanish = 0;
destination.portal_wants_to_vanish = 0;
self.solid = SOLID_BBOX;
self.aiment = world;
- g = frametime * '0 0 -1' * cvar("sv_gravity");
+ g = frametime * '0 0 -1' * autocvar_sv_gravity;
fixedmakevectors(self.mangle);
portal.portal_activatetime = time + 0.1;
portal.takedamage = DAMAGE_AIM;
portal.event_damage = Portal_Damage;
- portal.fade_time = time + cvar("g_balance_portal_lifetime");
- portal.health = cvar("g_balance_portal_health");
+ portal.fade_time = time + autocvar_g_balance_portal_lifetime;
+ portal.health = autocvar_g_balance_portal_health;
setmodel(portal, "models/portal.md3");
portal.modelindex_lod0 = portal.modelindex;
portal.customizeentityforclient = Portal_Customize;