forked from github/server
seeding
This commit is contained in:
parent
9a104e8a18
commit
8bb5509446
|
@ -242,10 +242,10 @@ seed_dropouts(void)
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
newfaction **nfp = &newfactions;
|
newfaction **nfp = &newfactions;
|
||||||
unit * u;
|
unit * u;
|
||||||
for (u=r->units;u;u=u->next) if (u->faction->no==drop->fno) break;
|
for (u=r->units;u;u=u->next) if (u->faction->no!=drop->fno) break;
|
||||||
if (u==NULL) while (*nfp) {
|
if (u==NULL) while (*nfp) {
|
||||||
newfaction * nf = *nfp;
|
newfaction * nf = *nfp;
|
||||||
if (nf->race==drop->race) {
|
if (nf->race==drop->race && !nf->bonus) {
|
||||||
unit * u = addplayer(r, nf->email, nf->race, nf->lang);
|
unit * u = addplayer(r, nf->email, nf->race, nf->lang);
|
||||||
if (nf->bonus) give_latestart_bonus(r, u, nf->bonus);
|
if (nf->bonus) give_latestart_bonus(r, u, nf->bonus);
|
||||||
*nfp = nf->next;
|
*nfp = nf->next;
|
||||||
|
@ -309,7 +309,7 @@ select_newfaction(const struct race * rc)
|
||||||
while (player) {
|
while (player) {
|
||||||
if (rc==NULL || player->race==rc) {
|
if (rc==NULL || player->race==rc) {
|
||||||
char str[80];
|
char str[80];
|
||||||
snprintf(str, 70, "%s %s", locale_string(default_locale, rc_name(player->race, 0)), player->email);
|
snprintf(str, 70, "%s %s %s", player->bonus?"!":" ", locale_string(default_locale, rc_name(player->race, 0)), player->email);
|
||||||
insert_selection(iinsert, prev, strdup(str), (void*)player);
|
insert_selection(iinsert, prev, strdup(str), (void*)player);
|
||||||
prev = *iinsert;
|
prev = *iinsert;
|
||||||
iinsert = &prev->next;
|
iinsert = &prev->next;
|
||||||
|
|
|
@ -1448,6 +1448,10 @@ main(int argc, char *argv[])
|
||||||
else
|
else
|
||||||
turn = atoi(argv[++i]);
|
turn = atoi(argv[++i]);
|
||||||
break;
|
break;
|
||||||
|
case 'f':
|
||||||
|
firstx = atoi(argv[++i]);
|
||||||
|
firsty = atoi(argv[++i]);
|
||||||
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
orderfile = argv[++i];
|
orderfile = argv[++i];
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue