float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax)
{
- if (player.classname == "player" && player.health >= 1)
+ if (IS_PLAYER(player) && player.health >= 1)
{
TDEATHLOOP(org)
{
if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team)
- if(head.classname == "player")
+ if(IS_PLAYER(head))
if(head.health >= 1)
return 1;
}
{
TDEATHLOOP(player.origin)
{
- if (player.classname == "player" && player.health >= 1)
+ if (IS_PLAYER(player) && player.health >= 1)
{
if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team)
{
- if(head.classname == "player")
+ if(IS_PLAYER(head))
if(head.health >= 1)
++tdeath_hit;
Damage (head, teleporter, telefragger, 10000, DEATH_TELEFRAG, head.origin, '0 0 0');
if(self.pushltime < time) // only show one teleport effect per teleporter per 0.2 seconds, for better fps
{
if(tflags & TELEPORT_FLAG_SOUND)
- sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
+ sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTEN_NORM);
if(tflags & TELEPORT_FLAG_PARTICLES)
{
pointparticles(particleeffectnum("teleport"), player.origin, '0 0 0', 1);
UpdateCSQCProjectileAfterTeleport(player);
- if(player.classname == "player")
+ if(IS_PLAYER(player))
{
if(tflags & TELEPORT_FLAG_TDEATH)
if(player.takedamage && player.deadflag == DEAD_NO && !g_race && !g_cts && (autocvar_g_telefrags || (tflags & TELEPORT_FLAG_FORCE_TDEATH)))
tdeath(player, teleporter, telefragger, telefragmin, telefragmax);
// player no longer is on ground
- player.flags &~= FL_ONGROUND;
+ player.flags &= ~FL_ONGROUND;
// reset tracking of oldvelocity for impact damage (sudden velocity changes)
player.oldvelocity = player.velocity;
if(!other.vehicle.teleportable)
return;
- if(other.turrcaps_flags & TFL_TURRCAPS_ISTURRET)
+ if(other.turret_flags & TUR_FLAG_ISTURRET)
return;
if(other.deadflag != DEAD_NO)
return;
if(self.team)
- if((self.spawnflags & 4 == 0) == (self.team != other.team))
+ if(((self.spawnflags & 4) == 0) == (self.team != other.team))
return;
EXACTTRIGGER_TOUCH;
- if(other.classname == "player")
+ if(IS_PLAYER(other))
RemoveGrapplingHook(other);
entity e;
// this must be called to spawn the teleport waypoints for bots
InitializeEntity(self, teleport_findtarget, INITPRIO_FINDTARGET);
- if (!self.target)
+ if (self.target == "")
{
objerror ("Teleporter with no target");
return;
print("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".\n");
pl.owner = world;
}
- if(pl.classname == "player")
+ if(IS_PLAYER(pl))
{
// reset tracking of oldvelocity for impact damage (sudden velocity changes)
pl.oldvelocity = pl.velocity;