- Personenzahl in score.alliances

This commit is contained in:
Christian Schlittchen 2002-11-04 20:19:17 +00:00
parent ce40676469
commit f3c7da7dbc
1 changed files with 5 additions and 3 deletions

View File

@ -277,17 +277,19 @@ score(void)
sprintf(buf, "%s/score.alliances", basepath());
scoreFP = fopen(buf, "w");
fprintf(scoreFP, "# alliance:persons:score\n");
for (a = alliances; a; a = a->next) {
int alliance_score = 0;
int alliance_score = 0, alliance_number = 0;
for (f = factions; f; f = f->next) {
if(f->alliance && f->alliance->id == a->id) {
alliance_score += f->score;
alliance_score += f->score;
alliance_number += f->number;
}
}
fprintf(scoreFP, "%d:%d\n", a->id, alliance_score);
fprintf(scoreFP, "%d:%d:%d\n", a->id, alliance_number, alliance_score);
}
fclose(scoreFP);
}