From e9285c9fe205845a91617e3070e566ad0ab1bbec Mon Sep 17 00:00:00 2001 From: cohrs Date: Tue, 11 Jan 2005 19:47:37 +0000 Subject: [PATCH] followup: drinking from sinks while levitating This is a followup to the patch I made a couple months ago. It replaces the "!Levitation && !u.uswallow" checks with can_reach_floor(), which makes a more complete set of checks and is more consistent. I applied this to fountains too. I doubt that fountains hit the ceiling, and the checks also seem reasonable for heights in between (e.g. while mounted). --- src/potion.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/potion.c b/src/potion.c index 05afbd7bf..5bb61f14b 100644 --- a/src/potion.c +++ b/src/potion.c @@ -342,7 +342,7 @@ dodrink() return 0; } /* Is there a fountain to drink from here? */ - if (IS_FOUNTAIN(levl[u.ux][u.uy].typ) && !Levitation && !u.uswallow) { + if (IS_FOUNTAIN(levl[u.ux][u.uy].typ) && can_reach_floor()) { if(yn("Drink from the fountain?") == 'y') { drinkfountain(); return 1; @@ -350,7 +350,7 @@ dodrink() } #ifdef SINKS /* Or a kitchen sink? */ - if (IS_SINK(levl[u.ux][u.uy].typ) && !Levitation && !u.uswallow) { + if (IS_SINK(levl[u.ux][u.uy].typ) && can_reach_floor()) { if (yn("Drink from the sink?") == 'y') { drinksink(); return 1; -- 2.40.0