]> git.pond.sub.org Git - empserver/commit
Use the new Empire clock for implementing MOB_ACCESS:
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 15 Jul 2007 09:43:57 +0000 (09:43 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 15 Jul 2007 09:43:57 +0000 (09:43 +0000)
commit4bd19812af9724687a78fd1f81cb4caa78ee7c96
tree445a453182d29532cea8109270353b1e4db30bbb
parentaa34ef2b7b4932eb3802a422427a7be58e127d9c
Use the new Empire clock for implementing MOB_ACCESS:
(lndstr, plnstr, sctstr, shpstr): Change timestamp members lnd_access,
pln_access, sct_access, shp_access from real time (time_t) to ETUs
within a turn (short).
(land_ca, plane_ca, sect_ca, ship_ca): Update accordingly.
(build_ship, build_land, build_bridge, build_plane, build_tower)
(explore, check_trade, bsanct, takeover, takeover_ship)
(takeover_land): Use game_tick_to_now() instead of time() to update
the timestamp.  Change check_trade(), takeover_ship(), takeover_land()
to do that only when MOB_ACCESS is enabled, for consistency.
(lupgr, supgr, pupgr, takeover_ship): Don't touch the timestamp where
mobility isn't touched either.
(sct_do_upd_mob, shp_do_upd_mob, lnd_do_upd_mob, pln_do_upd_mob): Use
game_tick_to_now() instead of increase_mob() to compute ETUs since
the timestamp and update the timestamp.  Closes #1012699.
(increase_mob): Remove.
(mob_sect, mob_ship, mob_land, mob_plane): sct_do_upd_mob() & friends
no longer do the right thing at the update.  Use game_reset_tick() and
pass its result directly to do_mob_sect() & friends.  This is only
correct when argument is etu_per_update, which it always is.  Remove
parameter.  Callers changed.
(do_mob_sect, do_mob_ship, do_mob_land, do_mob_plane): Oops on
negative argument.

(mob_acc_globals, timestampfil, mobupdate, updating_mob)
(update_all_mob, timestamp_fixing, update_timestamps, mobility_check):
The mobupdate command was important to let deities manually
synchronize mobility updating with updates.  That's no longer needed.
The code behind it is somewhat hairy and ugly, and updating it to work
with the Empire clock is just not worth it.  Remove.  Users changed.
(player_coms): Update accordingly.
(upda): Remove display of mobility updating state.

(mobility_init): No need to fix up mobility on startup, as the Empire
clock runs normally even when the server is down.  Remove.  Caller
changed.
25 files changed:
include/land.h
include/misc.h
include/optlist.h
include/plane.h
include/prototypes.h
include/sect.h
include/server.h
include/ship.h
info/mobupdate.t [deleted file]
src/lib/commands/buil.c
src/lib/commands/expl.c
src/lib/commands/mobu.c [deleted file]
src/lib/commands/trad.c
src/lib/commands/upda.c
src/lib/commands/upgr.c
src/lib/global/nsc.c
src/lib/global/path.c.in
src/lib/player/empmod.c
src/lib/subs/bsanct.c
src/lib/subs/takeover.c
src/lib/update/main.c
src/lib/update/mobility.c
src/server/main.c
src/server/timestamp.c [deleted file]
src/util/files.c