#include "scores.qh"
#include "command/common.qh"
-#include "mutators/all.qh"
+#include "mutators/_mod.qh"
+#include <common/net_linked.qh>
#include "../common/playerstats.qh"
#include "../common/teams.qh"
{
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);
}
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;
});
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;
});
});
{
if(sk.(teamscores(j)) != 0)
if(teamscores_label(j) != "")
- sk.SendFlags |= pow(2, j);
+ sk.SendFlags |= (2 ** j);
sk.(teamscores(j)) = 0;
}
}
bool mutator_returnvalue = MUTATOR_CALLHOOK(AddPlayerScore, scorefield, score, player);
score = M_ARGV(1, float);
- if(gameover)
+ if(game_stopped)
if(!mutator_returnvalue)
score = 0;
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);
if(t <= 0 || t >= 16)
{
- if(gameover)
+ if(game_stopped)
return 0;
error("Reading score of invalid team!");
}
sk = p.scorekeeper;
- s = strcat(s, p.netname);
+ s = strcat(s, playername(p, false));
for (;;)
{
i = strlennocol(s) - NAMEWIDTH;
void Score_NicePrint_Spectator(entity to, entity p)
{
- print_to(to, strcat(" ", p.netname));
+ print_to(to, strcat(" ", playername(p, false)));
}
.float score_dummyfield;