summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/target.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-10-03 21:46:11 -0400
committerNeil Moore <neil@s-z.org>2013-10-03 21:46:11 -0400
commit8630c3414585d3480065ff607bedeb7dddf5f2a8 (patch)
tree6c41d56b6988fbd9e60a4600e86f197e88ee03e8 /crawl-ref/source/target.cc
parent427093f47f774f298a609c139c1f1a88ababd7bc (diff)
downloadcrawl-ref-8630c3414585d3480065ff607bedeb7dddf5f2a8.tar.gz
crawl-ref-8630c3414585d3480065ff607bedeb7dddf5f2a8.zip
Handle two missing no_landing_reasons.
Diffstat (limited to 'crawl-ref/source/target.cc')
-rw-r--r--crawl-ref/source/target.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/target.cc b/crawl-ref/source/target.cc
index 73efba14d4..29e04a377a 100644
--- a/crawl-ref/source/target.cc
+++ b/crawl-ref/source/target.cc
@@ -913,15 +913,21 @@ bool targetter_jump::valid_aim(coord_def a)
return notify_fail("A dungeon feature is in the way.");
else if (!has_additional_sites(a, true))
{
- if (no_landing_reason == BLOCKED_FLYING)
+ switch (no_landing_reason)
+ {
+ case BLOCKED_FLYING:
return notify_fail("A flying creature is in the way.");
- else if (no_landing_reason == BLOCKED_GIANT)
+ case BLOCKED_GIANT:
return notify_fail("A giant creature is in the way.");
- else if (no_landing_reason == BLOCKED_MOVE)
+ case BLOCKED_MOVE:
+ case BLOCKED_OCCUPIED:
return notify_fail("There is no safe place to jump near that"
" location.");
- else if (no_landing_reason == BLOCKED_PATH)
+ case BLOCKED_PATH:
return notify_fail("A dungeon feature is in the way.");
+ case BLOCKED_NONE:
+ die("buggy no_landing_reason");
+ }
}
return true;
}