WriteByte(MSG_ENTITY, welcome_msg_too);
// welcome message is sent here because it needs to know the gametype
if (welcome_msg_too)
- SendWelcomemessage_msg_type(to, false, MSG_ENTITY);
+ SendWelcomeMessage(to, MSG_ENTITY);
return true;
}
sk = CS(player).scorekeeper;
FOREACH(Scores, true, {
if(sk.(scores(it)) != 0)
- if(scores_label(it) != "")
- sk.SendFlags |= BIT(i % 16);
+ //if(scores_label(it) != "")
+ sk.SendFlags |= (2 ** (i % 16));
if(i != SP_ELO.m_id)
sk.(scores(it)) = 0;
});
if (!sk) continue;
FOREACH(Scores, true, {
if(sk.(scores(it)) != 0)
- if(scores_label(it) != "")
- sk.SendFlags |= BIT(i % 16);
+ //if(scores_label(it) != "")
+ sk.SendFlags |= (2 ** (i % 16));
if(i != SP_ELO.m_id)
sk.(scores(it)) = 0;
});
for(int j = 0; j < MAX_TEAMSCORE; ++j)
{
if(sk.(teamscores(j)) != 0)
- if(teamscores_label(j) != "")
- sk.SendFlags |= BIT(j);
+ //if(teamscores_label(j) != "")
+ sk.SendFlags |= (2 ** j);
sk.(teamscores(j)) = 0;
}
}
{
return s.(scores(scorefield));
}
- if(scores_label(scorefield) != "")
- s.SendFlags |= BIT(scorefield.m_id % 16);
+ //if(scores_label(scorefield) != "")
+ s.SendFlags |= (2 ** (scorefield.m_id % 16));
if(!warmup_stage)
PlayerStats_GameReport_Event_Player(s.owner, strcat(PLAYERSTATS_TOTAL, scores_label(scorefield)), score);
s.(scores(scorefield)) += score;
return result;
}
+bool Score_NewLeader()
+{
+ if(teamplay) {
+ if (WinningConditionHelper_winnerteam != WinningConditionHelper_winnerteam_last && (WinningConditionHelper_secondteam || WinningConditionHelper_equality))
+ {
+ WinningConditionHelper_winnerteam_last = WinningConditionHelper_winnerteam;
+ return true;
+ }
+ } else {
+ if (WinningConditionHelper_winner != WinningConditionHelper_winner_last && (WinningConditionHelper_second || WinningConditionHelper_equality))
+ {
+ WinningConditionHelper_winner_last = WinningConditionHelper_winner;
+ return true;
+ }
+ }
+ return false;
+}
+
void WinningConditionHelper(entity this)
{
float c;
WinningConditionHelper_equality = (PlayerScore_Compare(winnerscorekeeper, secondscorekeeper, false) == 0);
if(WinningConditionHelper_equality)
+ {
+ WinningConditionHelper_equality_one = WinningConditionHelper_winner;
+ WinningConditionHelper_equality_two = WinningConditionHelper_second;
WinningConditionHelper_winner = WinningConditionHelper_second = NULL;
+ }
+ else
+ {
+ WinningConditionHelper_equality_one = WinningConditionHelper_equality_two = NULL;
+ }
WinningConditionHelper_topscore = winnerscorekeeper.scores_primary;
WinningConditionHelper_secondscore = secondscorekeeper.scores_primary;
{
fl = teamscores_flags(i);
sc = sk.(teamscores(i));
- s = strcat(s, " ", Score_NicePrint_ItemColor(fl), ScoreString(fl, sc));
+ s = strcat(s, " ", Score_NicePrint_ItemColor(fl), ScoreString(fl, sc, 0));
}
}
else
{
fl = scores_flags(it);
sc = sk.(scores(it));
- s = strcat(s, " ", Score_NicePrint_ItemColor(fl), strpad(-w, ScoreString(fl, sc)));
+ s = strcat(s, " ", Score_NicePrint_ItemColor(fl), strpad(-w, ScoreString(fl, sc, 0)));
}
});