#include "../../server/constants.qh"
#include "../../server/defs.qh"
#include "../deathtypes.qh"
- #include "../../server/tturrets/include/turrets_early.qh"
- #include "../../server/vehicles/all.qh"
+ #include "../turrets/sv_turrets.qh"
+ #include "../vehicles/all.qh"
#include "../mapinfo.qh"
#include "../../server/anticheat.qh"
#endif
}
void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity, vector telefragmin, vector telefragmax, float tflags)
-{
+{SELFPARAM();
entity telefragger;
vector from;
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, ATTEN_NORM);
+ sound (player, CH_TRIGGER, SND_TELEPORT, VOL_BASE, ATTEN_NORM);
if(tflags & TELEPORT_FLAG_PARTICLES)
{
- pointparticles(particleeffectnum("teleport"), player.origin, '0 0 0', 1);
- pointparticles(particleeffectnum("teleport"), to + v_forward * 32, '0 0 0', 1);
+ Send_Effect(EFFECT_TELEPORT, player.origin, '0 0 0', 1);
+ Send_Effect(EFFECT_TELEPORT, to + v_forward * 32, '0 0 0', 1);
}
self.pushltime = time + 0.2;
}
}
void teleport_findtarget (void)
-{
+{SELFPARAM();
entity e;
float n;
if(e.movetype == MOVETYPE_NONE)
waypoint_spawnforteleporter(self, e.origin, 0);
if(e.classname != "info_teleport_destination")
- print("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
+ LOG_INFO("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
}
if(n == 0)
}
void WarpZone_PostTeleportPlayer_Callback(entity pl)
-{
+{SELFPARAM();
makevectors(pl.angles);
Reset_ArcBeam(pl, v_forward);
UpdateCSQCProjectileAfterTeleport(pl);
{
- entity oldself = self;
- self = pl;
- anticheat_fixangle();
- self = oldself;
+ WITH(entity, self, pl, anticheat_fixangle());
}
// "disown" projectiles after teleport
if(pl.owner)
if(pl.owner == pl.realowner)
{
if(!(pl.flags & FL_PROJECTILE))
- print("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".\n");
+ LOG_INFO("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".\n");
pl.owner = world;
}
if(IS_PLAYER(pl))