]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/scores.qc
Merge branch 'master' into Mario/vaporizer_damage
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / scores.qc
index b940294fd97dd832d56c0b0af6751cb2efa7ec20..8f9da8b061d581bf609d34c3cf4c9ae84f877ede 100644 (file)
@@ -1,19 +1,4 @@
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
-    #include "../common/constants.qh"
-    #include "../common/teams.qh"
-    #include "../common/util.qh"
-    #include "autocvars.qh"
-    #include "constants.qh"
-    #include "defs.qh"
-    #include "mutators/mutators_include.qh"
-    #include "../common/mapinfo.qh"
-    #include "../common/playerstats.qh"
-    #include "scores.qh"
-#endif
+#include "scores.qh"
 
 .entity scorekeeper;
 entity teamscorekeepers[16];
@@ -36,26 +21,26 @@ vector ScoreField_Compare(entity t1, entity t2, .float field, float fieldflags,
        if(t1.field == t2.field)
                return previous;
 
-       previous_y = fieldflags & SFL_SORT_PRIO_MASK;
+       previous.y = fieldflags & SFL_SORT_PRIO_MASK;
 
        if(fieldflags & SFL_ZERO_IS_WORST)
        {
                if(t1.field == 0)
                {
-                       previous_x = -1;
+                       previous.x = -1;
                        return previous;
                }
                else if(t2.field == 0)
                {
-                       previous_x = +1;
+                       previous.x = +1;
                        return previous;
                }
        }
 
        if(fieldflags & SFL_LOWER_IS_BETTER)
-               previous_x = (t2.field - t1.field);
+               previous.x = (t2.field - t1.field);
        else
-               previous_x = (t1.field - t2.field);
+               previous.x = (t1.field - t2.field);
 
        return previous;
 }
@@ -153,8 +138,8 @@ float TeamScore_Compare(entity t1, entity t2, float strict)
                result = ScoreField_Compare(t1, t2, f, teamscores_flags[i], result, strict);
        }
 
-       if (result_x == 0 && strict)
-               result_x = t1.team - t2.team;
+       if (result.x == 0 && strict)
+               result.x = t1.team - t2.team;
 
        return result.x;
 }
@@ -390,8 +375,8 @@ float PlayerScore_Compare(entity t1, entity t2, float strict)
                result = ScoreField_Compare(t1, t2, f, scores_flags[i], result, strict);
        }
 
-       if (result_x == 0 && strict)
-               result_x = num_for_edict(t1.owner) - num_for_edict(t2.owner);
+       if (result.x == 0 && strict)
+               result.x = num_for_edict(t1.owner) - num_for_edict(t2.owner);
 
        return result.x;
 }
@@ -850,7 +835,7 @@ void Score_NicePrint_Player(entity to, entity p, float w)
        sk = p.scorekeeper;
 
        s = strcat(s, p.netname);
-       for(0;;)
+       for (;;)
        {
                i = strlennocol(s) - NAMEWIDTH;
                if(i > 0)