diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-01-05 14:18:36 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-01-05 14:29:45 +0100 |
commit | 2db87d6d5c94edc73c41230093cc3d1cfe251bf1 (patch) | |
tree | b880787e42f9b8cd56cad86c15fb76c35a6d68b6 /crawl-ref/source/mon-clone.cc | |
parent | 2b2b927f740c756cb93982818b763432be60d9a4 (diff) | |
download | crawl-ref-2db87d6d5c94edc73c41230093cc3d1cfe251bf1.tar.gz crawl-ref-2db87d6d5c94edc73c41230093cc3d1cfe251bf1.zip |
Make high-level monster creation return monster*
Diffstat (limited to 'crawl-ref/source/mon-clone.cc')
-rw-r--r-- | crawl-ref/source/mon-clone.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crawl-ref/source/mon-clone.cc b/crawl-ref/source/mon-clone.cc index b1231bc348..91eff0cff6 100644 --- a/crawl-ref/source/mon-clone.cc +++ b/crawl-ref/source/mon-clone.cc @@ -198,16 +198,13 @@ void mons_summon_illusion_from(monster* mons, actor *foe, if (foe->atype() == ACT_PLAYER) { ASSERT(foe == &you); - const int midx = - create_monster( + if (monster *clone = create_monster( mgen_data(MONS_PLAYER_ILLUSION, SAME_ATTITUDE(mons), mons, - 6, spell_cast, mons->pos(), mons->foe, 0)); - if (midx != -1) + 6, spell_cast, mons->pos(), mons->foe, 0))) { mpr("There is a horrible, sudden wrenching feeling in your soul!", MSGCH_WARN); - monster* clone = &menv[midx]; // Change type from player ghost. clone->type = MONS_PLAYER_ILLUSION; _init_player_illusion_properties( |