]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_teleporters.qc
Merge remote branch 'origin/master' into terencehill/centerprint_stuff
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_teleporters.qc
index fbc1afdeb02e93f084a5a17025c7d232b18a62a6..0adbd5196af1731fecf51774167e77816d161c1b 100644 (file)
@@ -90,7 +90,7 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle
        if(self.pushltime < time) // only show one teleport effect per teleporter per 0.2 seconds, for better fps
        {
                if(tflags & TELEPORT_FLAG_SOUND)
-                       asound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
+                       sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
                if(tflags & TELEPORT_FLAG_PARTICLES)
                {
                        pointparticles(particleeffectnum("teleport"), player.origin, '0 0 0', 1);
@@ -251,18 +251,15 @@ void teleport_findtarget (void)
        entity e;
        float n;
 
-       RandomSelection_Init();
        n = 0;
        for(e = world; (e = find(e, targetname, self.target)); )
        {
                ++n;
                if(e.movetype == MOVETYPE_NONE)
-                       RandomSelection_Add(e, 0, string_null, 1, 1);
+                       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");
        }
-       if(RandomSelection_chosen_ent)
-               waypoint_spawnforteleporter(self, RandomSelection_chosen_ent.origin, 0);
 
        if(n == 0)
        {
@@ -274,7 +271,6 @@ void teleport_findtarget (void)
        {
                // exactly one dest - bots love that
                self.enemy = find(e, targetname, self.target);
-               self.dest = self.enemy.origin;
        }
        else
        {