diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-07 23:13:30 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-08 01:31:41 +0100 |
commit | 05c8dfaba3d73566693df38b1e170c803e016842 (patch) | |
tree | 95347ff95d893e30a2c3101ba074c1a4e570bec2 /crawl-ref/source/monster.cc | |
parent | 5a1a9596b2b2d2d36df854fbea7adb6d4bb8c605 (diff) | |
download | crawl-ref-05c8dfaba3d73566693df38b1e170c803e016842.tar.gz crawl-ref-05c8dfaba3d73566693df38b1e170c803e016842.zip |
Remove player.h dependency from coordit.h.
adjacent_iterator had a default center of you.pos(), which is now
gone (also the uses of).
I was running into circular header dependencies with actor.h
including los_def.h including coordit.h including player.h including
actor.h.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r-- | crawl-ref/source/monster.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index aa756c120e..7896fd321b 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -4031,7 +4031,7 @@ static bool _prepare_del_ench(monsters* mon, const mon_enchant &me) coord_def target_square; int okay_squares = 0; - for (adjacent_iterator ai; ai; ++ai) + for (adjacent_iterator ai(you.pos()); ai; ++ai) if (!actor_at(*ai) && monster_can_submerge(mon, grd(*ai)) && one_chance_in(++okay_squares)) @@ -4052,7 +4052,7 @@ static bool _prepare_del_ench(monsters* mon, const mon_enchant &me) // The terrain changed and the monster can't remain submerged. // Try to move to an adjacent square where it would be happy. - for (adjacent_iterator ai; ai; ++ai) + for (adjacent_iterator ai(you.pos()); ai; ++ai) { if (!monster_at(*ai) && monster_habitable_grid(mon, grd(*ai)) |