Provide an Empire clock with ETU resolution that is properly

synchronized to updates (the one based on s_p_etu isn't synchronized):
(gamestr): New members game_turn, game_tick, game_rt.
(game_ca): New selectors for them.  Restrict tick and rt to deity for
now.  We'd need xdump update the Empire clock to make them safe for
players.
(game_record_update): New.
(update_main): Call it.
(game_tick_tick, game_tick_to_now, game_step_a_tick): New, not yet
used.
This commit is contained in:
Markus Armbruster 2007-07-14 15:58:37 +00:00
parent 654335c621
commit dd2daaaab3
4 changed files with 157 additions and 0 deletions

View file

@ -37,6 +37,7 @@
#include "budg.h"
#include "empthread.h"
#include "game.h"
#include "journal.h"
#include "player.h"
#include "server.h"
@ -61,6 +62,7 @@ update_main(void)
struct natstr *np;
logerror("production update (%d etus)", etu);
game_record_update(time(NULL));
journal_update(etu);
/* First, make sure all mobility is updated correctly. */