From 92735e97d9b83fa4871528097bc855a57526fe4f Mon Sep 17 00:00:00 2001 From: Martin Read Date: Mon, 10 Mar 2014 20:22:38 +0000 Subject: [PATCH] Minor tweakign to message handling for stair commands --- display-nc.cc | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/display-nc.cc b/display-nc.cc index 2bd3722..1d9ad51 100644 --- a/display-nc.cc +++ b/display-nc.cc @@ -1299,21 +1299,8 @@ void get_player_action(Action *act) case '<': { Terrain t = lvl.terrain_at(u.pos); - if (terrain_props[t].flags & TFLAG_portal) + if (terrain_props[t].flags & (TFLAG_portal | TFLAG_ascend)) { - if (terrain_props[t].flags & TFLAG_ascend) - { - act->cmd = GO_UP_STAIRS; - return; - } - else - { - act->cmd = GO_DOWN_STAIRS; - return; - } - } - else if (terrain_props[t].flags & TFLAG_ascend) - { act->cmd = GO_UP_STAIRS; return; } @@ -1326,14 +1313,14 @@ void get_player_action(Action *act) case '>': { Terrain t = lvl.terrain_at(u.pos); - if (terrain_props[t].flags & TFLAG_descend) + if (terrain_props[t].flags & (TFLAG_descend | TFLAG_portal)) { act->cmd = GO_DOWN_STAIRS; return; } else { - print_msg("There are no stairs or portals here.\n"); + print_msg("There are no portals or downward stairs here.\n"); } } break; -- 2.11.0