summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/l_view.cc')
-rw-r--r--crawl-ref/source/l_view.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/l_view.cc b/crawl-ref/source/l_view.cc
index 23175d3670..04d076e3af 100644
--- a/crawl-ref/source/l_view.cc
+++ b/crawl-ref/source/l_view.cc
@@ -10,6 +10,7 @@
#include "cluautil.h"
#include "env.h"
#include "l_defs.h"
+#include "player.h"
coord_def player2show(const coord_def &s)
{
@@ -20,7 +21,8 @@ LUAFN(view_feature_at)
{
COORDSHOW(s, 1, 2)
const coord_def p = player2show(s);
- lua_pushnumber(ls, env.show(p));
+ if (env.show(p))
+ lua_pushnumber(ls, env.grid(s + you.pos()));
return (1);
}