summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg-cmd.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2011-01-13 17:55:23 +0100
committerRaphael Langella <raphael.langella@gmail.com>2011-01-13 20:51:00 +0100
commit5a4495603c98b85401d17196976441a0ed1dfa4f (patch)
tree1ae58ab6ba93f504039ff6fe5c90bfeb2651eb1e /crawl-ref/source/tilereg-cmd.cc
parent28755a29fcbf58a5273fc3d8ad0ba61963d5f880 (diff)
downloadcrawl-ref-5a4495603c98b85401d17196976441a0ed1dfa4f.tar.gz
crawl-ref-5a4495603c98b85401d17196976441a0ed1dfa4f.zip
Revert "Don't check i_feel_safe and abilities for drawing the command tab."
This reverts commit 61f5d664dbbbb0252a0c8d6572fc8d7af270d0d0. This wasn't the cause of the slowdown.
Diffstat (limited to 'crawl-ref/source/tilereg-cmd.cc')
-rw-r--r--crawl-ref/source/tilereg-cmd.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/tilereg-cmd.cc b/crawl-ref/source/tilereg-cmd.cc
index 41a1518ab6..9dc7d3ebd7 100644
--- a/crawl-ref/source/tilereg-cmd.cc
+++ b/crawl-ref/source/tilereg-cmd.cc
@@ -9,6 +9,7 @@
#include "tilereg-cmd.h"
+#include "abl-show.h"
#include "cio.h"
#include "command.h"
#include "enum.h"
@@ -162,11 +163,17 @@ static bool _command_not_applicable(const command_type cmd)
{
switch (cmd)
{
+ case CMD_REST:
+ case CMD_EXPLORE:
+ case CMD_INTERLEVEL_TRAVEL:
+ return (!i_feel_safe(false));
case CMD_DISPLAY_RELIGION:
return (you.religion == GOD_NO_GOD);
case CMD_PRAY:
return (you.religion == GOD_NO_GOD
&& !feat_is_altar(grd(you.pos())));
+ case CMD_USE_ABILITY:
+ return (your_talents(false).empty());
default:
return (false);
}