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).
This commit is contained in:
cohrs
2005-01-11 19:47:37 +00:00
parent d957558be4
commit e9285c9fe2

View File

@@ -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;