if(head != player) \
if(head.takedamage) \
if(boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
-
+
float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax)
{
{
TDEATHLOOP(org)
{
- if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team)
+ if (!(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team))
if(IS_PLAYER(head))
if(head.health >= 1)
return 1;
{
if (IS_PLAYER(player) && player.health >= 1)
{
- if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team)
+ if (!(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team))
{
if(IS_PLAYER(head))
if(head.health >= 1)
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);
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;
vector locout;
entity e;
float p;
-
+
// Find the output teleporter
if(teleporter.enemy)
{
e = teleporter.enemy;
}
else
- {
+ {
RandomSelection_Init();
for(e = world; (e = find(e, targetname, teleporter.target)); )
{
}
if(!e) { sprint(player, "Teleport destination vanished. Sorry... please complain to the mapper.\n"); }
-
+
makevectors(e.mangle);
if(e.speed)
if(vlen(player.velocity) > e.speed)
player.velocity = normalize(player.velocity) * max(0, e.speed);
-
+
if(autocvar_g_teleport_maxspeed)
if(vlen(player.velocity) > autocvar_g_teleport_maxspeed)
player.velocity = normalize(player.velocity) * max(0, autocvar_g_teleport_maxspeed);
if (self.active != ACTIVE_ACTIVE)
return;
-
- if not(other.teleportable)
+
+ if (!other.teleportable)
return;
-
+
if(other.vehicle)
if(!other.vehicle.teleportable)
return;
-
+
if(other.turrcaps_flags & TFL_TURRCAPS_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(IS_PLAYER(other))
RemoveGrapplingHook(other);
-
+
entity e;
e = Simple_TeleportPlayer(self, other);
activator = other;
s = self.target; self.target = string_null;
SUB_UseTargets();
- if not(self.target) self.target = s;
+ if (!self.target) self.target = s;
oldself = self;
self = e;
return world;
}
-entity teleport_first;
+entity teleport_first;
.entity teleport_next;
void spawnfunc_trigger_teleport (void)
{
self.angles = '0 0 0';
EXACTTRIGGER_INIT;
-
- self.active = ACTIVE_ACTIVE;
-
+
+ self.active = ACTIVE_ACTIVE;
+
self.use = trigger_teleport_use;
// this must be called to spawn the teleport waypoints for bots
objerror ("Teleporter with no target");
return;
}
-
+
self.teleport_next = teleport_first;
teleport_first = self;
}
void WarpZone_PostTeleportPlayer_Callback(entity pl)
{
UpdateCSQCProjectileAfterTeleport(pl);
+ {
+ entity oldself = self;
+ self = pl;
+ anticheat_fixangle();
+ self = oldself;
+ }
// "disown" projectiles after teleport
if(pl.owner)
if(pl.owner == pl.realowner)