summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/arena.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-21 17:55:18 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-21 17:55:18 -0700
commitdf9bbe2bc324f8403ecc78f4d1d29a932a072a5e (patch)
tree737cb7f76d2c87a5309832c0b641be90dfead958 /crawl-ref/source/arena.cc
parentc6eb2f02bbbc152f45b6ec5f3cb0e522edf38363 (diff)
downloadcrawl-ref-df9bbe2bc324f8403ecc78f4d1d29a932a072a5e.tar.gz
crawl-ref-df9bbe2bc324f8403ecc78f4d1d29a932a072a5e.zip
arena.cc: Make sure adjust_spells() gets all mons
Apply arena::adjust_spells() in arena_placed_monster() to make sure that it gets absolutely everything.
Diffstat (limited to 'crawl-ref/source/arena.cc')
-rw-r--r--crawl-ref/source/arena.cc20
1 files changed, 6 insertions, 14 deletions
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc
index 44bdc34b59..e6e1c14556 100644
--- a/crawl-ref/source/arena.cc
+++ b/crawl-ref/source/arena.cc
@@ -134,17 +134,6 @@ namespace arena
void adjust_monsters()
{
- if (!allow_summons || !allow_animate)
- {
- for (int m = 0; m < MAX_MONSTERS; ++m)
- {
- monsters *mons(&menv[m]);
- if (!mons->alive())
- continue;
- adjust_spells(mons, !allow_summons, !allow_animate);
- }
- }
-
for (int i = 0; i < MAX_MONSTERS; i++)
{
monsters *mon = &menv[i];
@@ -1170,6 +1159,10 @@ void arena_placed_monster(monsters *monster)
more();
}
+ if (!arena::allow_summons || !arena::allow_animate)
+ arena::adjust_spells(monster, !arena::allow_summons,
+ !arena::allow_animate);
+
if (monster->type == MONS_TEST_SPAWNER)
{
if (monster->attitude == ATT_FRIENDLY)
@@ -1222,9 +1215,8 @@ void arena_placed_monster(monsters *monster)
if (arena::move_summons)
monster_teleport(monster, true, true);
- if (!arena::allow_chain_summons || !arena::allow_animate)
- arena::adjust_spells(monster, !arena::allow_chain_summons,
- !arena::allow_animate);
+ if (!arena::allow_chain_summons)
+ arena::adjust_spells(monster, true, false);
}
}