]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/ctf/ctf.qc
Merge branch 'master' into Lyberta/TeamplayOverhaul
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / ctf / ctf.qc
index 9382c9d8d75bc8636964673164310ae8a0b8d2e8..322f8979d9fadba5c583c0adfb3fb2e587fd9a4d 100644 (file)
@@ -1377,7 +1377,8 @@ void havocbot_ctf_calculate_middlepoint()
        havocbot_middlepoint = s / n;
        havocbot_middlepoint_radius = vlen(fo - havocbot_middlepoint);
 
-       havocbot_symmetryaxis_equation = '0 0 0';
+       havocbot_symmetry_axis_m = 0;
+       havocbot_symmetry_axis_q = 0;
        if(n == 2)
        {
                // for symmetrical editing of waypoints
@@ -1385,11 +1386,10 @@ void havocbot_ctf_calculate_middlepoint()
                entity f2 = f1.ctf_worldflagnext;
                float m = -(f1.origin.y - f2.origin.y) / (f1.origin.x - f2.origin.x);
                float q = havocbot_middlepoint.y - m * havocbot_middlepoint.x;
-               havocbot_symmetryaxis_equation.x = m;
-               havocbot_symmetryaxis_equation.y = q;
+               havocbot_symmetry_axis_m = m;
+               havocbot_symmetry_axis_q = q;
        }
-       // store number of flags in this otherwise unused vector component
-       havocbot_symmetryaxis_equation.z = n;
+       havocbot_symmetry_origin_order = n;
 }
 
 
@@ -2466,11 +2466,9 @@ MUTATOR_HOOKFUNCTION(ctf, HavocBot_ChooseRole)
        return true;
 }
 
-MUTATOR_HOOKFUNCTION(ctf, CheckAllowedTeams)
+MUTATOR_HOOKFUNCTION(ctf, TeamBalance_CheckAllowedTeams)
 {
-       //M_ARGV(0, float) = ctf_teams;
        M_ARGV(1, string) = "ctf_team";
-       return true;
 }
 
 MUTATOR_HOOKFUNCTION(ctf, SpectateCopy)
@@ -2696,7 +2694,7 @@ spawnfunc(team_CTL_bluelolly)  { spawnfunc_item_flag_team2(this);    }
 // scoreboard setup
 void ctf_ScoreRules(int teams)
 {
-       CheckAllowedTeams(NULL);
+       //CheckAllowedTeams(NULL); // Bug? Need to get allowed teams?
        GameRules_scoring(teams, SFL_SORT_PRIO_PRIMARY, 0, {
         field_team(ST_CTF_CAPS, "caps", SFL_SORT_PRIO_PRIMARY);
         field(SP_CTF_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);