return; // handled by think
if(!autocvar_g_vehicles_teleportable)
- if(other.vehicle_flags & VHF_ISVEHICLE)
+ if(IS_VEHICLE(other))
return; // no teleporting vehicles?
if(!this.enemy)
void Portal_Disconnect(entity teleporter, entity destination)
{
- teleporter.enemy = world;
- destination.enemy = world;
+ teleporter.enemy = NULL;
+ destination.enemy = NULL;
Portal_MakeBrokenPortal(teleporter);
Portal_MakeBrokenPortal(destination);
}
}
if(portal == portal.aiment.portal_in)
- portal.aiment.portal_in = world;
+ portal.aiment.portal_in = NULL;
if(portal == portal.aiment.portal_out)
- portal.aiment.portal_out = world;
- //portal.aiment = world;
+ portal.aiment.portal_out = NULL;
+ //portal.aiment = NULL;
// makes the portal vanish
if(killed)
o = this.aiment;
this.solid = SOLID_BBOX;
- this.aiment = world;
+ this.aiment = NULL;
g = frametime * '0 0 -1' * autocvar_sv_gravity;
Portal_Remove(this, 0);
}
-float Portal_Customize()
-{SELFPARAM();
+float Portal_Customize(entity this)
+{
if(IS_SPEC(other))
other = other.enemy;
if(other == this.aiment)
fixedmakevectors(ang);
if(!CheckWireframeBox(own, org - 48 * v_right - 48 * v_up + 16 * v_forward, 96 * v_right, 96 * v_up, 96 * v_forward))
- return world;
+ return NULL;
portal = new(portal);
portal.aiment = own;
portal.health = autocvar_g_balance_portal_health;
setmodel(portal, MDL_PORTAL);
portal.savemodelindex = portal.modelindex;
- portal.customizeentityforclient = Portal_Customize;
+ setcefc(portal, Portal_Customize);
if(!Portal_FindSafeOrigin(portal))
{
remove(portal);
- return world;
+ return NULL;
}
setsize(portal, '-48 -48 -48', '48 48 48');