diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-10-24 01:13:03 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-10-24 01:16:23 +0200 |
commit | 030a9692ab9c0726bfda5f73777e6d6a0a00a37f (patch) | |
tree | ce6d44297d95990121b1ca6387c94e5f9ab07316 /crawl-ref | |
parent | 1d578dda6fd52327bc9191d353834ce0f246dbcc (diff) | |
download | crawl-ref-030a9692ab9c0726bfda5f73777e6d6a0a00a37f.tar.gz crawl-ref-030a9692ab9c0726bfda5f73777e6d6a0a00a37f.zip |
Fix a crash when a boulder beetle dies to its own first move.
Besides, why should they even get to start rolling if there's an enemy
next to them? Isn't rolling damage supposed to require some space to
gain momentum? They can keep biting when up close.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/mon-abil.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/mon-project.cc | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc index c884aa884b..b89ad0654c 100644 --- a/crawl-ref/source/mon-abil.cc +++ b/crawl-ref/source/mon-abil.cc @@ -3731,6 +3731,7 @@ bool mon_special_ability(monster* mons, bolt & beem) // behaviour_event(mons, ME_CORNERED); simple_monster_message(mons, " curls into a ball and rolls away!"); boulder_start(mons, &beem); + used = true; } } // Normal check - don't roll at adjacent targets @@ -3739,6 +3740,7 @@ bool mon_special_ability(monster* mons, bolt & beem) { simple_monster_message(mons, " curls into a ball and starts rolling!"); boulder_start(mons, &beem); + used = true; } } break; diff --git a/crawl-ref/source/mon-project.cc b/crawl-ref/source/mon-project.cc index 53c9e37aef..94980d0f5d 100644 --- a/crawl-ref/source/mon-project.cc +++ b/crawl-ref/source/mon-project.cc @@ -152,6 +152,9 @@ static bool _in_front(float vx, float vy, float dx, float dy, float angle) static void _iood_stop(monster& mon, bool msg = true) { + if (!mon.alive()) + return; + if (mons_is_boulder(&mon)) { // Deduct the energy first - the move they made that just stopped |