From 044a177398ab80ce82bc63d6e10dfab0942570f1 Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 1 Nov 2007 22:52:52 +0000 Subject: Some prayer cases which shouldn't have taken time were taking time. [1824174] git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2718 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index e924109a87..57217e8218 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -953,12 +953,13 @@ void pray() // almost all prayers take time you.turn_is_over = true; - const bool was_praying = you.duration[DUR_PRAYER]; - if (you.duration[DUR_PRAYER]) + const bool was_praying = !!you.duration[DUR_PRAYER]; + if (was_praying) { - mpr("Stop praying? ('y' ends prayer, 'r' will renew prayer)", MSGCH_PROMPT); + mpr("Stop praying? ('y' ends prayer, 'r' will renew prayer)", + MSGCH_PROMPT); - int tmp = get_ch(); + const int tmp = getch(); if ( tmp == 'y' || tmp == 'Y') { @@ -969,6 +970,7 @@ void pray() if ( tmp != 'r' && tmp != 'R') { + you.turn_is_over = false; mesclr(); return; } @@ -979,6 +981,7 @@ void pray() { if (you.flight_mode() == FL_LEVITATE) { + you.turn_is_over = false; mpr("You are floating high above the altar."); return; } @@ -991,6 +994,7 @@ void pray() { if (you.species == SP_DEMIGOD) { + you.turn_is_over = false; mpr("Sorry, a being of your status cannot worship here."); return; } @@ -1019,7 +1023,10 @@ void pray() // they don't want to lose if ( you.religion == GOD_NEMELEX_XOBEH && altar_god == GOD_NO_GOD && !confirm_pray_sacrifice() ) + { + you.turn_is_over = false; return; + } mprf(MSGCH_PRAY, "You offer a prayer to %s.", god_name(you.religion)); -- cgit v1.2.3-54-g00ecf