.vector portal_safe_origin;
.float portal_wants_to_vanish;
.float portal_activatetime;
+.float savemodelindex;
float PlayerEdgeDistance(entity p, vector v)
{
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);