]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/scores_rules.qc
fix a stupid typo, add a cvar to autocvars.qh
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / scores_rules.qc
index 78b6560f9f2c45216e7f5b561ca99ee68ff4734e..61fc9f4c9e5e5521778427724f033bc756ff1338 100644 (file)
@@ -34,7 +34,6 @@ void ScoreRules_basics_end()
 }
 void ScoreRules_generic()
 {
-       CheckAllowedTeams(world);
        if(teams_matter)
        {
                CheckAllowedTeams(world);
@@ -91,7 +90,7 @@ void ScoreRules_dom()
 {
        float sp_domticks, sp_score;
        sp_score = sp_domticks = 0;
-       if(cvar("g_domination_disable_frags"))
+       if(autocvar_g_domination_disable_frags)
                sp_domticks = SFL_SORT_PRIO_PRIMARY;
        else
                sp_score = SFL_SORT_PRIO_PRIMARY;
@@ -195,11 +194,20 @@ void ScoreRules_nexball(float teams)
 #define SP_KEEPAWAY_SCORE 7
 void ScoreRules_keepaway()
 {
-       print("^4ScoreRules_keepaway was just called!\n");
-       ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, 0, FALSE);
-       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_SCORE,                "score",        SFL_SORT_PRIO_PRIMARY);
-       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_PICKUPS,      "pickups",  0);
-       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_CARRIERKILLS, "bckills",  0);
-       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_DROPS,        "drops",    SFL_LOWER_IS_BETTER);
+       ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, 0, FALSE); // SFL_SORT_PRIO_PRIMARY
+       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_SCORE,               "score",                SFL_SORT_PRIO_PRIMARY);
+       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_PICKUPS,             "pickups",              0);
+       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_CARRIERKILLS,        "bckills",              0);
+       ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_DROPS,               "drops",                SFL_LOWER_IS_BETTER);
+       ScoreRules_basics_end();
+}
+
+// FreezeTag stuff
+#define SP_FREEZETAG_REVIVALS 4
+void ScoreRules_freezetag()
+{
+       CheckAllowedTeams(world);
+       ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); // SFL_SORT_PRIO_PRIMARY
+       ScoreInfo_SetLabel_PlayerScore(SP_FREEZETAG_REVIVALS,           "revivals",             0);
        ScoreRules_basics_end();
 }