diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2014-03-23 18:55:08 +0000 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2014-03-23 19:25:09 +0000 |
commit | 641055a5d1c783d55af5f24b46a9e4bd399a8e3f (patch) | |
tree | 9662496bfa45d6b411cebec6c1461276b6893d9c /crawl-ref/source/teleport.cc | |
parent | 06a901b0f7a8b39d62b0d3d304bdca0e51b20919 (diff) | |
download | crawl-ref-641055a5d1c783d55af5f24b46a9e4bd399a8e3f.tar.gz crawl-ref-641055a5d1c783d55af5f24b46a9e4bd399a8e3f.zip |
Fix blinks placing the player over deep water/lava with temporary flight
It should only be possible with permanent flight (or on species that
can swim).
Diffstat (limited to 'crawl-ref/source/teleport.cc')
-rw-r--r-- | crawl-ref/source/teleport.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/teleport.cc b/crawl-ref/source/teleport.cc index 49c88bcd61..e18262fca5 100644 --- a/crawl-ref/source/teleport.cc +++ b/crawl-ref/source/teleport.cc @@ -235,8 +235,13 @@ bool valid_blink_destination(const actor* moved, const coord_def& target, return false; if (actor_at(target)) return false; - if (forbid_unhabitable && !moved->is_habitable(target)) - return false; + if (forbid_unhabitable) + { + if (!moved->is_habitable(target)) + return false; + if (moved->is_player() && is_feat_dangerous(grd(target), true)) + return false; + } if (forbid_sanctuary && is_sanctuary(target)) return false; if (!moved->see_cell_no_trans(target)) |