(opt_UPDATESCHED): Remove nooption UPDATESCHED. It had no effect on

the actual update, only on the update command.  Believed to be broken
since Empire2.
This commit is contained in:
Markus Armbruster 2005-12-29 13:38:57 +00:00
parent fb768e844c
commit 1969a3890a
4 changed files with 76 additions and 100 deletions

View file

@ -177,8 +177,6 @@ EMPCF_OPT("TRADESHIPS", opt_TRADESHIPS,
"Enable Tradeships") "Enable Tradeships")
EMPCF_OPT("TREATIES", opt_TREATIES, EMPCF_OPT("TREATIES", opt_TREATIES,
"Allow treaties") "Allow treaties")
EMPCF_OPT("UPDATESCHED", opt_UPDATESCHED,
"Used to control update times and should always be used")
EMPCF_COMMENT("\n\n### Countries") EMPCF_COMMENT("\n\n### Countries")
EMPCFBOTH("btu_build_rate", btu_build_rate, float, NSC_FLOAT, 0, EMPCFBOTH("btu_build_rate", btu_build_rate, float, NSC_FLOAT, 0,

View file

@ -8,7 +8,6 @@ SHOWPLANE: planes/units on ships/units up for trade are shown
PINPOINT(etc): Missile exist which target ships instead of sectors PINPOINT(etc): Missile exist which target ships instead of sectors
SAIL: another way to automatically move ships (may also be buggy) SAIL: another way to automatically move ships (may also be buggy)
DEMANDUPDATE: updates may be allowed on player demand DEMANDUPDATE: updates may be allowed on player demand
UPDATESCHED: updates can be controlled by the 'hours' file. NITP
The following options were introduced in the Chainsaw server: The following options were introduced in the Chainsaw server:

View file

@ -52,6 +52,7 @@ upda(void)
{ {
FILE *fp; FILE *fp;
struct mob_acc_globals timestamps; struct mob_acc_globals timestamps;
time_t now, next, delta;
if (opt_MOB_ACCESS) { if (opt_MOB_ACCESS) {
if ((fp = fopen(timestampfil, "rb")) == NULL) if ((fp = fopen(timestampfil, "rb")) == NULL)
@ -69,8 +70,6 @@ upda(void)
} }
} }
} }
if (opt_UPDATESCHED) {
time_t now, next, delta;
if (updates_disabled()) if (updates_disabled())
pr("UPDATES ARE DISABLED!\n"); pr("UPDATES ARE DISABLED!\n");
@ -149,23 +148,4 @@ upda(void)
pr("Game hours are: %s\n", game_hours); pr("Game hours are: %s\n", game_hours);
return 0; return 0;
} else {
time_t now;
time_t upd_time;
time_t next_update;
int secs_per_update;
int delta;
(void)time(&now);
upd_time = now + adj_update;
secs_per_update = etu_per_update * s_p_etu;
delta = secs_per_update - (upd_time % secs_per_update);
next_update = now + delta;
pr("The next update is at %19.19s.\n", ctime(&next_update));
pr("The current time is %19.19s.\n", ctime(&now));
if (update_window) {
pr("Update times are variable, update window is +/- %d minutes %d seconds.\n", update_window / 60, update_window % 60);
}
return 0;
}
} }

View file

@ -69,4 +69,3 @@ int opt_SUPER_BARS = 0;
int opt_TECH_POP = 0; int opt_TECH_POP = 0;
int opt_TRADESHIPS = 0; int opt_TRADESHIPS = 0;
int opt_TREATIES = 1; int opt_TREATIES = 1;
int opt_UPDATESCHED = 1;