summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index b9d4d7e152..64dd7bfa3a 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1767,8 +1767,8 @@ std::string cloud_name(cloud_type type)
bool mons_is_safe(const struct monsters *mon, bool want_move)
{
- bool is_safe = mons_friendly(mon) ||
- mons_class_flag(mon->type, M_NO_EXP_GAIN);
+ bool is_safe = mons_friendly(mon)
+ || mons_class_flag(mon->type, M_NO_EXP_GAIN);
#ifdef CLUA_BINDINGS
bool moving = ((!you.delay_queue.empty() &&
@@ -1783,7 +1783,9 @@ bool mons_is_safe(const struct monsters *mon, bool want_move)
if (clua.callfn("ch_mon_is_safe", "Mbbd>b",
mon, is_safe, moving, dist,
&result))
+ {
is_safe = result;
+ }
#endif
return is_safe;