(gamehours): All callers ignore the value assigned to hour[]. Remove

parameter.  Remove calls without effect.  Other callers changed.
This commit is contained in:
Markus Armbruster 2004-04-04 14:20:30 +00:00
parent 2df3f002e1
commit ded3daf70d
6 changed files with 8 additions and 23 deletions

View file

@ -91,7 +91,6 @@ int
main(int argc, char **argv)
{
time_t now;
int hour[2];
int flags = 0;
int op;
char *config_file = NULL;
@ -207,7 +206,6 @@ main(int argc, char **argv)
ef_init();
init_files();
io_init();
gamehours(now, hour);
if (opt_MOB_ACCESS) {
/* This fixes up mobility upon restart */

View file

@ -49,7 +49,6 @@ mobility_check(void *unused)
struct mob_acc_globals timestamps;
time_t now;
FILE *fp;
int hour[2];
while (1) {
time(&now);
@ -68,7 +67,7 @@ mobility_check(void *unused)
rewind(fp);
fwrite(&timestamps, sizeof(timestamps), 1, fp);
fclose(fp);
if (!gamehours(now, hour)) {
if (!gamehours(now)) {
if (updating_mob == 1) {
update_all_mob();
logerror("Turning off mobility updating (gamehours).");
@ -127,7 +126,7 @@ mobility_init(void)
time(&now);
logerror("Done at %s", ctime(&now));
if (now >= timestamps.starttime && gamehours(now, hour)) {
if (now >= timestamps.starttime && gamehours(now)) {
logerror("Turning on mobility updating.");
updating_mob = 1;
} else {

View file

@ -50,7 +50,6 @@ void
update_sched(void *unused)
{
s_char *kw;
int hour[2];
int wind;
time_t now, delta;
@ -58,7 +57,6 @@ update_sched(void *unused)
empth_create(PP_SCHED, update_wait, (50 * 1024), 0, "UpdateWait",
"Waits until players idle", 0);
time(&now);
(void)gamehours(now, hour);
if (s_p_etu <= 0) {
logerror("bad value for s_p_etu (%d)", s_p_etu);
s_p_etu = 2 * 60;
@ -78,7 +76,7 @@ update_sched(void *unused)
empth_sleep(update_time);
time(&now);
now += adj_update;
if (!gamehours(now, hour)) {
if (!gamehours(now)) {
logerror("No update permitted (hours restriction)");
continue;
}