summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-30 10:47:49 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-30 10:47:49 +0000
commitf04f543b623b671c847bf9c04ae357a373c94597 (patch)
treeebc970be62d1a87826b7c298b46004ceed256c50 /crawl-ref/source/fight.cc
parentee9ddc532b06c1c3c4b30125037c107afb59a498 (diff)
downloadcrawl-ref-f04f543b623b671c847bf9c04ae357a373c94597.tar.gz
crawl-ref-f04f543b623b671c847bf9c04ae357a373c94597.zip
Fixed bug #2544413: slashing off a hydra's last head with a branded weapon
which wasn't the flaming brand would cause a crash. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8851 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index e00f2c89e4..01d0998523 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1895,6 +1895,9 @@ bool melee_attack::player_monattk_hit_effects(bool mondied)
// Returns true if a head was cut off *and* the wound was cauterized,
// in which case the cauterization was the ego effect, so don't burn
// the hydra some more.
+ //
+ // Also returns true if the hydra's last head was cut off, in which
+ // case nothing more should be done to the last hydra.
if (decapitate_hydra(damage_done))
return (!defender->alive());
@@ -3094,6 +3097,8 @@ bool melee_attack::chop_hydra_head( int dam,
defender_as_monster()->hit_points, true);
defender->hurt(attacker, defender_as_monster()->hit_points);
+
+ return (true);
}
else
{