(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

@ -49,18 +49,16 @@
/*
* returns true if game can be played now.
* Sets the number of minutes until the hours
* function must be re-called.
*/
int
gamehours(time_t now, int *hour)
gamehours(time_t now)
{
register s_char *bp;
register struct tm *tm;
int day;
int curtime;
int okday[7];
int tomorrow;
int hour[2];
tm = localtime(&now);
curtime = tm->tm_min + tm->tm_hour * 60;
@ -83,12 +81,6 @@ gamehours(time_t now, int *hour)
break;
if (bp == 0)
return 0;
} else {
hour[0] = 0;
hour[1] = 24 * 60;
}
tomorrow = tm->tm_wday + 1;
if (tomorrow >= 7)
tomorrow = 0;
return 1;
}

View file

@ -65,7 +65,6 @@ void
player_main(struct player *p)
{
struct natstr *natp;
int hour[2];
int secs;
s_char buf[128];
@ -83,7 +82,7 @@ player_main(struct player *p)
pr("You're not a deity!\n");
return;
}
if (!gamehours(player->curup, hour)) {
if (!gamehours(player->curup)) {
pr("Empire hours restriction in force\n");
if ((natp->nat_stat & STAT_GOD) == 0)
return;
@ -190,7 +189,6 @@ status(void)
struct natstr *natp;
int minute;
struct sctstr sect;
int hour[2];
s_char buf[128];
if (player->state == PS_SHUTDOWN)
@ -249,7 +247,7 @@ status(void)
* either day change, or hours restriction
*/
daychange(player->curup);
if (!gamehours(player->curup, hour)) {
if (!gamehours(player->curup)) {
pr("Empire hours restriction in force\n");
if ((natp->nat_stat & STAT_GOD) == 0) {
putnat(natp);