summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-mis.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-11-12 03:52:08 -0800
committerStefan O'Rear <stefanor@cox.net>2009-11-12 03:53:13 -0800
commit078019644214628520c8116a9b4a16f30d8fadf2 (patch)
treedf1fc93d35c6b39455445360e482be5c26e1e2ac /crawl-ref/source/spl-mis.cc
parent7f502e207784d2c33ab38079dadfa298ab9fafc6 (diff)
downloadcrawl-ref-078019644214628520c8116a9b4a16f30d8fadf2.tar.gz
crawl-ref-078019644214628520c8116a9b4a16f30d8fadf2.zip
Add summoner and non_actor_summoner to mgen_data
Monsters now know who summoned them. This will be important later. Probably breaks something; saves are not one of them.
Diffstat (limited to 'crawl-ref/source/spl-mis.cc')
-rw-r--r--crawl-ref/source/spl-mis.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-mis.cc b/crawl-ref/source/spl-mis.cc
index 5a1452e7da..511426ec09 100644
--- a/crawl-ref/source/spl-mis.cc
+++ b/crawl-ref/source/spl-mis.cc
@@ -707,7 +707,9 @@ bool MiscastEffect::_create_monster(monster_type what, int abj_deg,
(crawl_state.is_god_acting()) ? crawl_state.which_god_acting()
: GOD_NO_GOD;
- mgen_data data = mgen_data::hostile_at(what, alert,
+ if (cause.empty())
+ cause = get_default_cause();
+ mgen_data data = mgen_data::hostile_at(what, cause, alert,
abj_deg, 0, target->pos(), 0, god);
// hostile_at() assumes the monster is hostile to the player,