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);
|
n = min(want, n);
|
||||||
|
}
|
||||||
|
|
||||||
if (type->maxsize>0) {
|
if (type->maxsize>0) {
|
||||||
n = min(type->maxsize-completed, n);
|
n = min(type->maxsize-completed, n);
|
||||||
if (type->improvement==NULL) {
|
if (type->improvement==NULL) {
|
||||||
|
|
|
@ -1294,12 +1294,20 @@ writegame(char *path, char quiet)
|
||||||
FILE * F;
|
FILE * F;
|
||||||
#ifdef USE_PLAYERS
|
#ifdef USE_PLAYERS
|
||||||
char playerfile[MAX_PATH];
|
char playerfile[MAX_PATH];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_PLAYERS
|
||||||
sprintf(buf, "%s/%d.players", datapath(), turn);
|
sprintf(buf, "%s/%d.players", datapath(), turn);
|
||||||
export_players(playerfile);
|
export_players(playerfile);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* write_dynamictypes(); */
|
/* 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");
|
F = cfopen(path, "w");
|
||||||
if (F==NULL)
|
if (F==NULL)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue