diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-06 11:56:02 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-06 11:56:02 -0700 |
commit | 587b4fded1ad0b496cce0a708282ca00d3c1dc84 (patch) | |
tree | a729f912e7582b8ebdc584e59629f42842ecf041 /crawl-ref/source/spl-transloc.cc | |
parent | 6f24510ddd6b1be80c396e74d537a9a915535ebc (diff) | |
download | crawl-ref-587b4fded1ad0b496cce0a708282ca00d3c1dc84.tar.gz crawl-ref-587b4fded1ad0b496cce0a708282ca00d3c1dc84.zip |
Don't crash on semicontrolled blink (#8236).
Broken by a5274fd.
Diffstat (limited to 'crawl-ref/source/spl-transloc.cc')
-rw-r--r-- | crawl-ref/source/spl-transloc.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-transloc.cc b/crawl-ref/source/spl-transloc.cc index 962e34e865..bba7433470 100644 --- a/crawl-ref/source/spl-transloc.cc +++ b/crawl-ref/source/spl-transloc.cc @@ -319,8 +319,8 @@ void random_blink(bool allow_partial_control, bool override_abyss, bool override } // First try to find a random square not adjacent to the player, // then one adjacent if that fails. - else if (!random_near_space(you.pos(), target) - && !random_near_space(you.pos(), target, true)) + else if (!random_near_space(&you, you.pos(), target) + && !random_near_space(&you, you.pos(), target, true)) { mpr("You feel jittery for a moment."); } @@ -989,8 +989,8 @@ static bool _quadrant_blink(coord_def dir, int pow) // Find a space near our base point... // First try to find a random square not adjacent to the basepoint, // then one adjacent if that fails. - if (!random_near_space(base, target) - && !random_near_space(base, target, true)) + if (!random_near_space(&you, base, target) + && !random_near_space(&you, base, target, true)) { // Uh oh, WHY should this fail the blink? return false; |