Esempio n. 1
0
void renderscores() {
	if (!scoreson)
		return;
	scorelines.resize(0);
	if (!demoplayback)
		renderscore(player1);
	for (int i = 0; i < players.size(); ++i) {
		if (players[i])
			renderscore(players[i]);
	}
	sortmenu(0, scorelines.size());
	if (m_teammode) {
		teamsused = 0;
		for (int i = 0; i < players.size(); ++i) {
			addteamscore(players[i]);
		}
		if (!demoplayback)
			addteamscore(player1);
		teamscores[0] = 0;
		for(int i = 0; i < teamsused; ++i)
		{
			IString sc;
			std::sprintf(sc, "[ %s: %d ]", teamname[i], teamscore[i]);
			strcat_s(teamscores, sc);
		};
		menumanual(0, scorelines.size(), "");
		menumanual(0, scorelines.size() + 1, teamscores);
	};
}
Esempio n. 2
0
void renderscores()
{
    if(!scoreson) return;
    scorelines.setsize(0);
    if(!demoplayback) renderscore(player1);
    loopv(players) if(players[i]) renderscore(players[i]);
    
    // Added by Rick: Render Score for bots
    loopv(bots) if(bots[i]) renderscore(bots[i]);
    
    sortmenu(0, scorelines.length());
    if(m_teammode)
    {
        teamsused = 0;
        loopv(players) addteamscore(players[i]);
	
	// Added by Rick: Add team scores for bots
	loopv(bots) addteamscore(bots[i]);
	
        if(!demoplayback) addteamscore(player1);
        teamscores[0] = 0;
        loopj(teamsused)
        {
            sprintf_sd(sc)("[ %s: %d ]", teamname[j], teamscore[j]);
            strcat_s(teamscores, sc);
        };
        menumanual(0, scorelines.length(), "");
        menumanual(0, scorelines.length()+1, teamscores);
    };
};
Esempio n. 3
0
void renderscore(dynent *d)
{
    sprintf_sd(lag)("%d", d->plag);
    sprintf_sd(name) ("(%s)", d->name); 
    sprintf_s(scorelines.add().s)("%d\t%s\t%d\t%s\t%s", d->frags, d->state==CS_LAGGED ? "LAG" : lag, d->ping, d->team, d->state==CS_DEAD ? name : d->name);
    menumanual(0, scorelines.length()-1, scorelines.last().s); 
};
Esempio n. 4
0
void renderscore(Sprite *d) {
	IString lag;
	IString name;
	std::sprintf(lag, "%d", d->plag);
	std::sprintf(name, "(%s)", d->name);
	scorelines.emplace_back(sline());
	std::sprintf(scorelines.back().s, "%d\t%s\t%d\t%s\t%s", d->frags,
			d->state == CS_LAGGED ? "LAG" : lag, d->ping, d->team,
			d->state == CS_DEAD ? name : d->name);
	menumanual(0, scorelines.size() - 1, scorelines.back().s);
}