]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/scores.qc
havocbot_keyboard_movement is supposed to update .movement even if (time < this.havoc...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / scores.qc
index e6264b8693b4b360b7e8ad7c4a3b8f6c61a67e6c..c0ebfc54a6335da48be50c0798035412cd1cf797 100644 (file)
@@ -99,26 +99,26 @@ float TeamScore_AddToTeam(float t, float scorefield, float score)
 {
        entity s;
 
-       if(gameover)
+       if(game_stopped)
                score = 0;
 
        if(!scores_initialized) return 0; // FIXME remove this when everything uses this system
        if(t <= 0 || t >= 16)
        {
-               if(gameover)
+               if(game_stopped)
                        return 0;
                error("Adding score to invalid team!");
        }
        s = teamscorekeepers[t - 1];
        if(!s)
        {
-               if(gameover)
+               if(game_stopped)
                        return 0;
                error("Adding score to unknown team!");
        }
        if(score)
                if(teamscores_label(scorefield) != "")
-                       s.SendFlags |= pow(2, scorefield);
+                       s.SendFlags |= (2 ** scorefield);
        return (s.(teamscores(scorefield)) += score);
 }
 
@@ -265,7 +265,7 @@ float PlayerScore_Clear(entity player)
        FOREACH(Scores, true, {
                if(sk.(scores(it)) != 0)
                        if(scores_label(it) != "")
-                               sk.SendFlags |= pow(2, i % 16);
+                               sk.SendFlags |= (2 ** (i % 16));
                sk.(scores(it)) = 0;
        });
 
@@ -282,7 +282,7 @@ void Score_ClearAll()
                FOREACH(Scores, true, {
                        if(sk.(scores(it)) != 0)
                                if(scores_label(it) != "")
-                                       sk.SendFlags |= pow(2, i % 16);
+                                       sk.SendFlags |= (2 ** (i % 16));
                        sk.(scores(it)) = 0;
                });
        });
@@ -295,7 +295,7 @@ void Score_ClearAll()
                {
                        if(sk.(teamscores(j)) != 0)
                                if(teamscores_label(j) != "")
-                                       sk.SendFlags |= pow(2, j);
+                                       sk.SendFlags |= (2 ** j);
                        sk.(teamscores(j)) = 0;
                }
        }
@@ -324,7 +324,7 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score)
        bool mutator_returnvalue = MUTATOR_CALLHOOK(AddPlayerScore, scorefield, score, player);
        score = M_ARGV(1, float);
 
-       if(gameover)
+       if(game_stopped)
        if(!mutator_returnvalue)
                score = 0;
 
@@ -332,14 +332,14 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score)
        entity s = player.scorekeeper;
        if(!s)
        {
-               if(gameover)
+               if(game_stopped)
                        return 0;
                LOG_WARN("Adding score to unknown player!");
                return 0;
        }
        if(score)
                if(scores_label(scorefield) != "")
-                       s.SendFlags |= pow(2, scorefield.m_id % 16);
+                       s.SendFlags |= (2 ** (scorefield.m_id % 16));
        if(!warmup_stage)
                PS_GR_P_ADDVAL(s.owner, strcat(PLAYERSTATS_TOTAL, scores_label(scorefield)), score);
        return (s.(scores(scorefield)) += score);
@@ -747,7 +747,7 @@ float TeamScore_GetCompareValue(float t)
 
        if(t <= 0 || t >= 16)
        {
-               if(gameover)
+               if(game_stopped)
                        return 0;
                error("Reading score of invalid team!");
        }
@@ -824,7 +824,7 @@ void Score_NicePrint_Player(entity to, entity p, float w)
 
        sk = p.scorekeeper;
 
-       s = strcat(s, p.netname);
+       s = strcat(s, playername(p, false));
        for (;;)
        {
                i = strlennocol(s) - NAMEWIDTH;
@@ -856,7 +856,7 @@ void Score_NicePrint_Spectators(entity to)
 
 void Score_NicePrint_Spectator(entity to, entity p)
 {
-       print_to(to, strcat("  ", p.netname));
+       print_to(to, strcat("  ", playername(p, false)));
 }
 
 .float score_dummyfield;