bool TeamScore_SendEntity(entity this, entity to, float sendflags)
{
- float i, p, longflags;
+ float i, longflags;
WriteHeader(MSG_ENTITY, ENT_CLIENT_TEAMSCORES);
int t = this.team - 1;
WriteByte(MSG_ENTITY, t);
longflags = 0;
- for(i = 0, p = 1; i < MAX_TEAMSCORE; ++i, p *= 2)
+ for(i = 0; i < MAX_TEAMSCORE; ++i)
if(this.(teamscores(i)) > 127 || this.(teamscores(i)) <= -128)
- longflags |= p;
+ longflags |= BIT(i);
#if MAX_TEAMSCORE <= 8
WriteByte(MSG_ENTITY, sendflags);
WriteShort(MSG_ENTITY, sendflags);
WriteShort(MSG_ENTITY, longflags);
#endif
- for(i = 0, p = 1; i < MAX_TEAMSCORE; ++i, p *= 2)
- if(sendflags & p)
+ for(i = 0; i < MAX_TEAMSCORE; ++i)
+ if(sendflags & BIT(i))
{
- if(longflags & p)
+ if(longflags & BIT(i))
WriteInt24_t(MSG_ENTITY, this.(teamscores(i)));
else
WriteChar(MSG_ENTITY, this.(teamscores(i)));
WinningConditionHelper_second = NULL;
winnerscorekeeper = NULL;
secondscorekeeper = NULL;
- FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it), {
sk = CS(it).scorekeeper;
c = PlayerScore_Compare(winnerscorekeeper, sk, 1);
if(c < 0)
secondscorekeeper = sk;
}
}
- ));
+ });
WinningConditionHelper_equality = (PlayerScore_Compare(winnerscorekeeper, secondscorekeeper, 0) == 0);
if(WinningConditionHelper_equality)
strunzone(worldstatus);
worldstatus = strzone(s);
- FOREACH_CLIENT(true, LAMBDA(
+ FOREACH_CLIENT(true, {
string s = "";
if(fullstatus)
{
if(it.clientstatus)
strunzone(it.clientstatus);
it.clientstatus = strzone(s);
- ));
+ });
}
string GetScoreLogLabel(string label, float fl)
plist = NULL;
- FOREACH_CLIENT(true, LAMBDA(it.(field) = 0));
+ FOREACH_CLIENT(true, { it.(field) = 0; });
FOREACH_CLIENT(CS(it).scorekeeper,
{
}
t = 0;
- FOREACH_CLIENT(!IS_PLAYER(it), LAMBDA(
+ FOREACH_CLIENT(!IS_PLAYER(it), {
if (!t)
Score_NicePrint_Spectators(to);
Score_NicePrint_Spectator(to, it);
t = 1;
- ));
+ });
}
void PlayerScore_PlayerStats(entity p)