]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/spawnpoints.qc
Rename 2 functions
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / spawnpoints.qc
index 18d32c2f06369b05dd5be39db868aca414a10d44..3d62c149cf9996c74454ea0c0e27c04c9ad6648a 100644 (file)
@@ -4,6 +4,7 @@
 #include "g_world.qh"
 #include "race.qh"
 #include "../common/constants.qh"
+#include <common/net_linked.qh>
 #include "../common/teams.qh"
 #include "../common/triggers/subs.qh"
 #include "../common/util.qh"
@@ -105,6 +106,7 @@ void relocate_spawnpoint(entity this)
     setthink(this, spawnpoint_think);
     this.nextthink = time + 0.5 + random() * 2; // shouldn't need it for a little second
     this.team_saved = this.team;
+    IL_PUSH(g_saved_team, this);
     if (!this.cnt)
         this.cnt = 1;
 
@@ -317,7 +319,7 @@ entity Spawn_WeightedPoint(entity firstspot, float lower, float upper, float exp
 
        RandomSelection_Init();
        for(spot = firstspot; spot; spot = spot.chain)
-               RandomSelection_AddEnt(spot, pow(bound(lower, spot.spawnpoint_score.y, upper), exponent) * spot.cnt, (spot.spawnpoint_score.y >= lower) * 0.5 + spot.spawnpoint_score.x);
+               RandomSelection_AddEnt(spot, (bound(lower, spot.spawnpoint_score.y, upper) ** exponent) * spot.cnt, (spot.spawnpoint_score.y >= lower) * 0.5 + spot.spawnpoint_score.x);
 
        return RandomSelection_chosen_ent;
 }