]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/scores.qc
Cleanup common includes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / scores.qc
index 69b18ba2a206d8685dd1ef33bf18604007a971fb..10ffc9c7e864a014f93bba4e496699479403972c 100644 (file)
@@ -1,14 +1,15 @@
 #include "scores.qh"
 
 #include "command/common.qh"
-#include "defs.qh"
-#include <server/g_world.qh>
-#include <server/miscfunctions.qh>
+#include <common/weapons/_all.qh>
+#include "client.qh"
+#include <server/intermission.qh>
+#include <server/world.qh>
 #include <server/mutators/_mod.qh>
 #include <server/round_handler.qh>
 #include <common/net_linked.qh>
-#include "../common/playerstats.qh"
-#include "../common/teams.qh"
+#include <common/playerstats.qh>
+#include <common/teams.qh>
 #include <common/mapinfo.qh>
 #include <common/mutators/base.qh>
 #include <common/scores.qh>
@@ -108,8 +109,7 @@ float TeamScore_AddToTeam(int t, float scorefield, float score)
 {
        entity s;
 
-       if(game_stopped || time < game_starttime
-               || (round_handler_IsActive() && !round_handler_IsRoundStarted()))
+       if(game_stopped)
        {
                score = 0;
        }
@@ -338,8 +338,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((!mutator_returnvalue && game_stopped) || time < game_starttime
-               || (round_handler_IsActive() && !round_handler_IsRoundStarted()))
+       if(!mutator_returnvalue && game_stopped)
        {
                score = 0;
        }
@@ -863,7 +862,7 @@ void Score_NicePrint_Player(entity to, entity p, float w)
 
        sk = CS(p).scorekeeper;
 
-       s = strcat(s, playername(p, false));
+       s = strcat(s, playername(p.netname, p.team, false));
        for (;;)
        {
                i = strlennocol(s) - NAMEWIDTH;
@@ -895,7 +894,7 @@ void Score_NicePrint_Spectators(entity to)
 
 void Score_NicePrint_Spectator(entity to, entity p)
 {
-       print_to(to, strcat("  ", playername(p, false)));
+       print_to(to, strcat("  ", playername(p.netname, p.team, false)));
 }
 
 .float score_dummyfield;