diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-10-23 07:36:08 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-10-24 00:30:34 +0200 |
commit | 79f717c01b6ca515d200ca9a50ca317bd33f9f6b (patch) | |
tree | eb93dc33aeef2134e39fabad85b9d70f91c9547d /crawl-ref/source/spl-transloc.cc | |
parent | 6c6489ef1adeb750ad8c411f39c9e7cf6f408dd5 (diff) | |
download | crawl-ref-79f717c01b6ca515d200ca9a50ca317bd33f9f6b.tar.gz crawl-ref-79f717c01b6ca515d200ca9a50ca317bd33f9f6b.zip |
Fix a wizmode player teleport crash.
Diffstat (limited to 'crawl-ref/source/spl-transloc.cc')
-rw-r--r-- | crawl-ref/source/spl-transloc.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-transloc.cc b/crawl-ref/source/spl-transloc.cc index f6d78f8643..2b1a4ae393 100644 --- a/crawl-ref/source/spl-transloc.cc +++ b/crawl-ref/source/spl-transloc.cc @@ -623,7 +623,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, else { // Leave a purple cloud. - if (!wizard_tele) + if (!wizard_tele && !cell_is_solid(old_pos)) place_cloud(CLOUD_TLOC_ENERGY, old_pos, 1 + random2(3), &you); move_player_to_grid(pos, false, true); @@ -698,7 +698,8 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area, } // Leave a purple cloud. - place_cloud(CLOUD_TLOC_ENERGY, old_pos, 1 + random2(3), &you); + if (!cell_is_solid(old_pos)) + place_cloud(CLOUD_TLOC_ENERGY, old_pos, 1 + random2(3), &you); move_player_to_grid(newpos, false, true); } |