Paused factions must not die of too many NMRs.

This commit is contained in:
Enno Rehling 2021-07-18 20:44:35 +02:00
parent 2196319073
commit 3e71453fb1
4 changed files with 4 additions and 4 deletions

View File

@ -659,7 +659,7 @@ void remove_empty_factions(void)
for (fp = &factions; *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);
}
else {

View File

@ -1335,7 +1335,7 @@ static void remove_idle_players(void)
for (fp = &factions; *fp;) {
faction *f = *fp;
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) {
++newbies[f->age];
}

View File

@ -258,7 +258,7 @@ get_island_info(region * root, int *size_p, int *inhabited_p, int *maxage_p)
if (r->units) {
unit *u;
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;
}
}

View File

@ -86,7 +86,7 @@ int update_nmrs(void)
if (f->age<=1) {
++newplayers;
}
else if (!fval(f, FFL_NOIDLEOUT|FFL_CURSED)) {
else if (!fval(f, FFL_NOIDLEOUT | FFL_CURSED)) {
int nmr = turn - f->lastorders;
if (timeout>0) {
if (nmr < 0 || nmr > timeout) {