X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fscores.qc;h=12175bb764f036435c1f745c0ac2ddc12fe74777;hb=97090df832317a4b885be09b00f33ff6175823d5;hp=af2f4b574f43a57f0c098d19c47b5fe2754428ac;hpb=5453f53da1df88742c11c71e4dc5b9c3e3d24c62;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index af2f4b574..12175bb76 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "../common/playerstats.qh" #include "../common/teams.qh" @@ -108,7 +109,9 @@ float TeamScore_AddToTeam(int t, float scorefield, float score) entity s; if(game_stopped) + { score = 0; + } if(!scores_initialized) return 0; // FIXME remove this when everything uses this system if(t <= 0 || t >= 16) @@ -334,9 +337,10 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score) bool mutator_returnvalue = MUTATOR_CALLHOOK(AddPlayerScore, scorefield, score, player); score = M_ARGV(1, float); - if(game_stopped) - if(!mutator_returnvalue) + if(!mutator_returnvalue && game_stopped) + { score = 0; + } if(!scores_initialized) return 0; // FIXME remove this when everything uses this system entity s = CS(player).scorekeeper;