diff options
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 3312bfcf94..b5c9e6bb40 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2889,14 +2889,15 @@ bool i_feel_safe(bool announce, bool want_move, bool just_monsters, int range) // check clouds if (in_bounds(you.pos()) && env.cgrid(you.pos()) != EMPTY_CLOUD) { - const cloud_type type = env.cloud[env.cgrid(you.pos())].type; + const int cloudidx = env.cgrid(you.pos()); + const cloud_type type = env.cloud[cloudidx].type; if (is_damaging_cloud(type, want_move)) { if (announce) { mprf(MSGCH_WARN, "You're standing in a cloud of %s!", - cloud_name(type).c_str()); + cloud_name(cloudidx).c_str()); } return (false); } |