.vector portal_safe_origin;
.float portal_wants_to_vanish;
.float portal_activatetime;
+.float savemodelindex;
float PlayerEdgeDistance(entity p, vector v)
{
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;
if(killed)
{
fixedmakevectors(portal.mangle);
- sound(portal, CHAN_PROJECTILE, "porto/explode.wav", VOL_BASE, ATTN_NORM);
+ sound(portal, CH_SHOTS, "porto/explode.wav", VOL_BASE, ATTN_NORM);
pointparticles(particleeffectnum("rocket_explode"), portal.origin + v_forward * 16, v_forward * 1024, 4);
remove(portal);
}
else
{
Portal_MakeBrokenPortal(portal);
- sound(portal, CHAN_PROJECTILE, "porto/expire.wav", VOL_BASE, ATTN_NORM);
+ sound(portal, CH_SHOTS, "porto/expire.wav", VOL_BASE, ATTN_NORM);
SUB_SetFade(portal, time, 0.5);
}
}
other = other.enemy;
if(other == self.aiment)
{
- self.modelindex = self.modelindex_lod0;
+ self.modelindex = self.savemodelindex;
}
else if(IS_INDEPENDENT_PLAYER(other) || IS_INDEPENDENT_PLAYER(self.aiment))
{
}
else
{
- self.modelindex = self.modelindex_lod0;
+ self.modelindex = self.savemodelindex;
}
return TRUE;
}
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.savemodelindex = portal.modelindex;
portal.customizeentityforclient = Portal_Customize;
if(!Portal_FindSafeOrigin(portal))
portal = Portal_Spawn(own, org, ang);
if(!portal)
- {
- // if(!own.portal_out || own.portal_out.portal_id == portal_id_val)
- Portal_ClearAll_PortalsOnly(own);
return 0;
- }
portal.portal_id = portal_id_val;
Portal_SetInPortal(own, portal);
portal = Portal_Spawn(own, org, ang);
if(!portal)
- {
- // if(!own.portal_in || own.portal_in.portal_id == portal_id_val)
- Portal_ClearAll_PortalsOnly(own);
return 0;
- }
portal.portal_id = portal_id_val;
Portal_SetOutPortal(own, portal);