forked from github/server
- Aktuelle Rundennummer in Datei 'turn'.
This commit is contained in:
parent
61e75a0708
commit
4547866348
|
@ -657,8 +657,10 @@ build(unit * u, const construction * ctype, int completed, int want)
|
|||
}
|
||||
}
|
||||
|
||||
if (want>0)
|
||||
if (want>0) {
|
||||
n = min(want, n);
|
||||
}
|
||||
|
||||
if (type->maxsize>0) {
|
||||
n = min(type->maxsize-completed, n);
|
||||
if (type->improvement==NULL) {
|
||||
|
|
|
@ -1294,12 +1294,20 @@ writegame(char *path, char quiet)
|
|||
FILE * F;
|
||||
#ifdef USE_PLAYERS
|
||||
char playerfile[MAX_PATH];
|
||||
#endif
|
||||
|
||||
#ifdef USE_PLAYERS
|
||||
sprintf(buf, "%s/%d.players", datapath(), turn);
|
||||
export_players(playerfile);
|
||||
#endif
|
||||
|
||||
/* write_dynamictypes(); */
|
||||
|
||||
/* write turn number to file for use by external scripts */
|
||||
F = fopen("turn","w");
|
||||
fprintf(F, "%d", turn);
|
||||
fclose(F);
|
||||
|
||||
F = cfopen(path, "w");
|
||||
if (F==NULL)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue