diff options
author | Neil Moore <neil@s-z.org> | 2012-09-08 12:15:57 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-09-08 16:07:57 -0400 |
commit | c3456a1f7d88e0cb56ef736a5cdbcd988a48b13a (patch) | |
tree | b2117e42fa1c37e66be040554b89e3abdfa76818 /crawl-ref/source/fineff.cc | |
parent | a128d033548fd4a7db4feedde5a8adf2f47ecc8e (diff) | |
download | crawl-ref-c3456a1f7d88e0cb56ef736a5cdbcd988a48b13a.tar.gz crawl-ref-c3456a1f7d88e0cb56ef736a5cdbcd988a48b13a.zip |
Bleed as a final effect.
Killing a kraken with an attack on one of its tentacles was crashing
when the attack caused bleeding, because the tentacle was killed
by monster::hurt() and hence its position was invalid.
See !lm @78291 crash 20 -log for an example.
Diffstat (limited to 'crawl-ref/source/fineff.cc')
-rw-r--r-- | crawl-ref/source/fineff.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/fineff.cc b/crawl-ref/source/fineff.cc index 6b0fea1088..7d772b72f9 100644 --- a/crawl-ref/source/fineff.cc +++ b/crawl-ref/source/fineff.cc @@ -11,6 +11,7 @@ #include "fineff.h" #include "libutil.h" #include "mgen_data.h" +#include "misc.h" #include "mon-place.h" #include "ouch.h" #include "religion.h" @@ -189,6 +190,11 @@ void fire_final_effects() case FINEFF_ROYAL_JELLY_SPAWN: _trj_spawns(attacker, defender, fe.pos, fe.x); break; + + case FINEFF_BLOOD: + monster_type montype = static_cast<monster_type>(fe.x & 0xffff); + int blood = (fe.x >> 16) & 0xffff; + bleed_onto_floor(fe.pos, montype, blood, true); } } env.final_effects.clear(); |