forked from github/server
Paused factions must not die of too many NMRs.
This commit is contained in:
parent
2196319073
commit
3e71453fb1
|
@ -659,7 +659,7 @@ void remove_empty_factions(void)
|
||||||
for (fp = &factions; *fp;) {
|
for (fp = &factions; *fp;) {
|
||||||
faction *f = *fp;
|
faction *f = *fp;
|
||||||
|
|
||||||
if (!(f->_alive && f->units!=NULL) && !fval(f, FFL_NOIDLEOUT)) {
|
if (!(f->_alive && f->units!=NULL) && !fval(f, FFL_PAUSED|FFL_NOIDLEOUT)) {
|
||||||
destroyfaction(fp);
|
destroyfaction(fp);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -1335,7 +1335,7 @@ static void remove_idle_players(void)
|
||||||
for (fp = &factions; *fp;) {
|
for (fp = &factions; *fp;) {
|
||||||
faction *f = *fp;
|
faction *f = *fp;
|
||||||
if (!is_monsters(f)) {
|
if (!is_monsters(f)) {
|
||||||
if (RemoveNMRNewbie() && !fval(f, FFL_NOIDLEOUT)) {
|
if (RemoveNMRNewbie() && !fval(f, FFL_PAUSED|FFL_NOIDLEOUT)) {
|
||||||
if (f->age >= 0 && f->age < MAXNEWPLAYERS) {
|
if (f->age >= 0 && f->age < MAXNEWPLAYERS) {
|
||||||
++newbies[f->age];
|
++newbies[f->age];
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,7 +258,7 @@ get_island_info(region * root, int *size_p, int *inhabited_p, int *maxage_p)
|
||||||
if (r->units) {
|
if (r->units) {
|
||||||
unit *u;
|
unit *u;
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
if (!fval(u->faction, FFL_NOIDLEOUT) && u->faction->age > maxage) {
|
if (!fval(u->faction, FFL_PAUSED | FFL_NOIDLEOUT) && u->faction->age > maxage) {
|
||||||
maxage = u->faction->age;
|
maxage = u->faction->age;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ int update_nmrs(void)
|
||||||
if (f->age<=1) {
|
if (f->age<=1) {
|
||||||
++newplayers;
|
++newplayers;
|
||||||
}
|
}
|
||||||
else if (!fval(f, FFL_NOIDLEOUT|FFL_CURSED)) {
|
else if (!fval(f, FFL_NOIDLEOUT | FFL_CURSED)) {
|
||||||
int nmr = turn - f->lastorders;
|
int nmr = turn - f->lastorders;
|
||||||
if (timeout>0) {
|
if (timeout>0) {
|
||||||
if (nmr < 0 || nmr > timeout) {
|
if (nmr < 0 || nmr > timeout) {
|
||||||
|
|
Loading…
Reference in New Issue