X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fscores.qc;h=e4e1d236aba4c11690c06c50dc99a03bd9dcb0c1;hp=67c115c8a56ff7dfc2135e973c693f6476762efa;hb=77a72b8a1d5686ac0ee30d5019f512086bcbaf3e;hpb=89f405ba71d1c354dca27a0af246f04fb9ec42e6 diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 67c115c8a..e4e1d236a 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -1,11 +1,20 @@ #include "scores.qh" #include "command/common.qh" -#include "mutators/_mod.qh" +#include +#include "client.qh" +#include +#include +#include +#include #include #include "../common/playerstats.qh" #include "../common/teams.qh" +#include +#include #include +#include +#include .entity scorekeeper; entity teamscorekeepers[16]; @@ -101,7 +110,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) @@ -327,9 +338,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; @@ -395,7 +407,7 @@ float PlayerScore_Compare(entity t1, entity t2, float strict) }); if (result.x == 0 && strict) - result.x = etof(t1.owner) - etof(t2.owner); + result.x = t1.owner.playerid - t2.owner.playerid; return result.x; }