vector from, to, safe, step, transform, ang, newvel;
float planeshift, s, t;
- if not(teleporter.enemy)
+ if (!teleporter.enemy)
{
backtrace("Portal_TeleportPlayer called without other portal being set. Stop.");
return 0;
//print(vtos(to), "\n");
// ang_x stuff works around weird quake angles
- if(player.classname == "player")
+ if(IS_PLAYER(player))
ang = Portal_ApplyTransformToPlayerAngle(transform, player.v_angle);
else
ang = AnglesTransform_ApplyToAngles(transform, player.angles);
player = self;
self = oldself;
- if not(teleporter.enemy)
+ if (!teleporter.enemy)
{
backtrace("Portal_TeleportPlayer ended up without other portal being set BEFORE TeleportPlayer. Stop.");
return 0;
{
// telefrag within 1 second of portal creation = amazing
if(time < teleporter.teleport_time + 1)
- AnnounceTo(player, "amazing");
+ Send_Notification(NOTIF_ONE, player, MSG_ANNCE, ANNCE_ACHIEVEMENT_AMAZING);
}
- if not(teleporter.enemy)
+ if (!teleporter.enemy)
{
backtrace("Portal_TeleportPlayer ended up without other portal being set AFTER TeleportPlayer. Stop.");
return 0;
if(self.solid != SOLID_TRIGGER)
return; // possibly engine bug
- if(other.classname == "player")
+ if(IS_PLAYER(other))
return; // handled by think
#endif
return;
}
if(other != self.aiment)
- if(other.classname == "player")
+ if(IS_PLAYER(other))
if(IS_INDEPENDENT_PLAYER(other) || IS_INDEPENDENT_PLAYER(self.aiment))
return; // cannot go through someone else's portal
if(other.aiment != self.aiment)
- if(other.aiment.classname == "player")
+ if(IS_PLAYER(other.aiment))
if(IS_INDEPENDENT_PLAYER(other.aiment) || IS_INDEPENDENT_PLAYER(self.aiment))
return; // cannot go through someone else's portal
fixedmakevectors(self.mangle);
{
portal.skin = 2;
portal.solid = SOLID_NOT;
- portal.touch = SUB_Null;
- portal.think = SUB_Null;
+ portal.touch = func_null;
+ portal.think = func_null;
portal.effects = 0;
portal.nextthink = 0;
portal.takedamage = DAMAGE_NO;
{
portal.skin = 2;
portal.solid = SOLID_NOT;
- portal.touch = SUB_Null;
- portal.think = SUB_Null;
+ portal.touch = func_null;
+ portal.think = func_null;
portal.effects = EF_ADDITIVE;
portal.nextthink = 0;
portal.takedamage = DAMAGE_YES;
{
portal.skin = 1;
portal.solid = SOLID_NOT;
- portal.touch = SUB_Null;
- portal.think = SUB_Null;
+ portal.touch = func_null;
+ portal.think = func_null;
portal.effects = EF_STARDUST | EF_BLUE;
portal.nextthink = 0;
portal.takedamage = DAMAGE_YES;
if(killed)
{
fixedmakevectors(portal.mangle);
- sound(portal, CH_SHOTS, "porto/explode.wav", VOL_BASE, ATTN_NORM);
+ sound(portal, CH_SHOTS, "porto/explode.wav", VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("rocket_explode"), portal.origin + v_forward * 16, v_forward * 1024, 4);
remove(portal);
}
else
{
Portal_MakeBrokenPortal(portal);
- sound(portal, CH_SHOTS, "porto/expire.wav", VOL_BASE, ATTN_NORM);
+ sound(portal, CH_SHOTS, "porto/expire.wav", VOL_BASE, ATTEN_NORM);
SUB_SetFade(portal, time, 0.5);
}
}
float Portal_Customize()
{
- if(other.classname == "spectator")
+ if(IS_SPEC(other))
other = other.enemy;
if(other == self.aiment)
{