From b404216dbe0d740f95b8ed685dc3d68871f869a1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 8 Feb 2009 13:20:57 +0100 Subject: [PATCH] Inline gamedown() into only user may_play_now() and simplify --- src/lib/player/empdis.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/src/lib/player/empdis.c b/src/lib/player/empdis.c index 685fc7a5a..eabb5be68 100644 --- a/src/lib/player/empdis.c +++ b/src/lib/player/empdis.c @@ -177,24 +177,6 @@ disable_coms(void) free(tmp); } -/* - * returns true if down - */ -static int -gamedown(int suppress_deity_message) -{ - if (!game_play_disabled()) - return 0; - if (player->god) { - if (!suppress_deity_message) - pr("The game is down\n"); - return 0; - } - show_first_tel(downfil); - pr("\nThe game is down\n"); - return 1; -} - static int seconds_since_midnight(time_t time) { @@ -262,8 +244,15 @@ may_play_now(struct natstr *natp, time_t now, return 0; } - if (gamedown(suppress_deity_message)) - return 0; + if (game_play_disabled()) { + if (natp->nat_stat != STAT_GOD) { + show_first_tel(downfil); + pr("\nThe game is down\n"); + return 0; + } + if (!suppress_deity_message) + pr("The game is down\n"); + } if ((natp->nat_stat != STAT_GOD && natp->nat_stat != STAT_VIS) && natp->nat_timeused > m_m_p_d * 60) { -- 2.43.0