show flag count on HUD (WIP)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6748 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -59,6 +59,18 @@ struct teamscore
|
||||
}
|
||||
};
|
||||
|
||||
void teamflagscores(int &team1, int &team2)
|
||||
{
|
||||
teamscore teamscores[2] = { teamscore(TEAM_CLA), teamscore(TEAM_RVSF) };
|
||||
loopv(players) if(players[i] && players[i]->team != TEAM_SPECT)
|
||||
{
|
||||
teamscores[team_base(players[i]->team)].addplayer(players[i]);
|
||||
}
|
||||
if(!watchingdemo) teamscores[team_base(player1->team)].addplayer(player1);
|
||||
team1 = teamscores[0].flagscore;
|
||||
team2 = teamscores[1].flagscore;
|
||||
}
|
||||
|
||||
static int teamscorecmp(const teamscore *x, const teamscore *y)
|
||||
{
|
||||
if(x->flagscore > y->flagscore) return -1;
|
||||
@@ -533,4 +545,4 @@ void winners()
|
||||
result(winners);
|
||||
}
|
||||
|
||||
COMMAND(winners, ARG_NONE);
|
||||
COMMAND(winners, ARG_NONE);
|
||||
|
||||
Reference in New Issue
Block a user