]> 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 4d7bd92cf86b3bbd4abf9daadc16537df796d5fe..0adbd5196af1731fecf51774167e77816d161c1b 100644 (file)
@@ -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
        {