summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-02 11:35:00 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-02 11:35:00 +0000
commitb8e11ca62974439ca6ff7930f7cf722053c10479 (patch)
tree25020e586f2c6259774055cabe11d6b417b9eb4f
parente09835c9e809651ba2fd757335f940f2262566e1 (diff)
downloadcrawl-ref-b8e11ca62974439ca6ff7930f7cf722053c10479.tar.gz
crawl-ref-b8e11ca62974439ca6ff7930f7cf722053c10479.zip
Trunk->0.3 merge (2946): Stop travel when monster beam attack misses player.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2968 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/beam.cc6
-rw-r--r--crawl-ref/source/delay.cc2
2 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index ef1ac0a1df..0ab2ff59e2 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -36,6 +36,7 @@
#include "cio.h"
#include "cloud.h"
+#include "delay.h"
#include "effects.h"
#include "enum.h"
#include "it_use2.h"
@@ -3052,6 +3053,11 @@ static int affect_player( bolt &beam )
return (range_used_on_hit(beam));
}
+ // Trigger an interrupt, so travel will stop on misses
+ // which generate smoke.
+ if (!YOU_KILL(beam.thrower))
+ interrupt_activity(AI_MONSTER_ATTACKS);
+
// BEGIN real beam code
beam.msg_generated = true;
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index c72a15f30b..4c1e1988a0 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -917,7 +917,7 @@ void run_macro(const char *macroname)
#endif
}
-// Returns true if the delay should be interrupted, false if the user function
+// Returns 1 if the delay should be interrupted, 0 if the user function
// had no opinion on the matter, -1 if the delay should not be interrupted.
static int userdef_interrupt_activity( const delay_queue_item &idelay,
activity_interrupt_type ai,