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