]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_spawn_near_teammate.qc
Rebalance monsters, add more options to the regen hook, also fix nades
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_spawn_near_teammate.qc
index e53c80f848cca975344b6e2025076bdecfec6c33..c3ab07a72635271dec43b04e0a87e1982361d8a6 100644 (file)
@@ -1,3 +1,7 @@
+#include "../_all.qh"
+
+#include "mutator.qh"
+
 .entity msnt_lookat;
 
 .float msnt_timer;
@@ -31,10 +35,10 @@ MUTATOR_HOOKFUNCTION(msnt_Spawn_Score)
        if(RandomSelection_chosen_ent)
        {
                spawn_spot.msnt_lookat = RandomSelection_chosen_ent;
-               spawn_score_x += SPAWN_PRIO_NEAR_TEAMMATE_FOUND;
+               spawn_score.x += SPAWN_PRIO_NEAR_TEAMMATE_FOUND;
        }
        else if(self.team == spawn_spot.team)
-               spawn_score_x += SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM; // prefer same team, if we can't find a spawn near teammate
+               spawn_score.x += SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM; // prefer same team, if we can't find a spawn near teammate
 
        return 0;
 }
@@ -57,7 +61,7 @@ MUTATOR_HOOKFUNCTION(msnt_PlayerSpawn)
                        if(team_mate.msnt_timer < time)
                        if(SAME_TEAM(self, team_mate))
                        if(time > team_mate.spawnshieldtime) // spawn shielding
-                       if(team_mate.freezetag_frozen == 0)
+                       if(team_mate.frozen == 0)
                        if(team_mate != self)
                        {
                                tracebox(team_mate.origin, PL_MIN, PL_MAX, team_mate.origin - '0 0 100', MOVE_WORLDONLY, team_mate);
@@ -136,7 +140,7 @@ MUTATOR_HOOKFUNCTION(msnt_PlayerSpawn)
        else if(spawn_spot.msnt_lookat)
        {
                self.angles = vectoangles(spawn_spot.msnt_lookat.origin - self.origin);
-               self.angles_x = -self.angles_x;
+               self.angles_x = -self.angles.x;
                self.angles_z = 0; // never spawn tilted even if the spot says to
                /*
                sprint(self, "You should be looking at ", spawn_spot.msnt_lookat.netname, "^7.\n");