BUG 2333 NMR-Anzahl im WB falsch

https://bugs.eressea.de/view.php?id=2333
This commit is contained in:
Enno Rehling 2017-06-11 17:06:13 +02:00
parent bcf103f581
commit f6ba5b6a53
4 changed files with 7 additions and 7 deletions

View File

@ -142,8 +142,9 @@ function process(rules, orders)
return -1
end
callbacks(rules, 'init')
turn_begin()
init_summary()
callbacks(rules, 'init')
-- run the turn:
if eressea.read_orders(orders) ~= 0 then
@ -157,12 +158,13 @@ function process(rules, orders)
return -1
end
process_orders()
callbacks(rules, 'update')
turn_process()
write_files(config.locales)
dbupdate()
turn_end()
file = '' .. get_turn() .. '.dat'
if eressea.write_game(file)~=0 then
eressea.log.error("could not write game")

View File

@ -869,6 +869,7 @@ const char * game_mailcmd(void)
}
*r = '\0';
log_warning("game.mailcmd configuration is not set, using %s from game.name", result);
config_set("game.mailcmd", result);
return result;
}
return param;

View File

@ -241,10 +241,7 @@ static faction *factionorders(void)
}
/* Die Partei hat sich zumindest gemeldet, so dass sie noch
* nicht als untätig gilt */
/* TODO: +1 ist ein Workaround, weil cturn erst in process_orders
* incrementiert wird. */
f->lastorders = turn + 1;
f->lastorders = turn;
}
else {

View File

@ -92,7 +92,7 @@ int update_nmrs(void)
++newplayers;
}
else if (!fval(f, FFL_NOIDLEOUT|FFL_CURSED)) {
int nmr = turn - f->lastorders + 1;
int nmr = turn - f->lastorders;
if (timeout>0) {
if (nmr < 0 || nmr > timeout) {
log_error("faction %s has %d NMR", itoa36(f->no), nmr);