diff options
author | DracoOmega <draco_omega@live.com> | 2013-03-07 17:48:16 -0330 |
---|---|---|
committer | DracoOmega <draco_omega@live.com> | 2013-03-08 00:21:34 -0330 |
commit | 7b177a007d8605b66fdd9eb8e0bb0e0f78766764 (patch) | |
tree | b0657abf56ad6bf3419c6727d7c0b52cb20f1c15 /crawl-ref/source/godcompanions.cc | |
parent | 2076e0c676639b317c213c669d6c1fb2fe365c37 (diff) | |
download | crawl-ref-7b177a007d8605b66fdd9eb8e0bb0e0f78766764.tar.gz crawl-ref-7b177a007d8605b66fdd9eb8e0bb0e0f78766764.zip |
Properly remove all companion tracking when you abandon Yred/Beogh
Due to delayed actions firing immediately after being queued, allies
on your present level would already have turned hostile by the time
the companion list was looking for them (and thus would not identify
them as allies). The friendliness check seems unnecessary anyway,
and so it has been removed.
An amusing side-effect of this issue meant that it was possible to
abandon one of these gods, rejoin, and then recall hostile former
allies from off-level to your location.
Diffstat (limited to 'crawl-ref/source/godcompanions.cc')
-rw-r--r-- | crawl-ref/source/godcompanions.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/crawl-ref/source/godcompanions.cc b/crawl-ref/source/godcompanions.cc index f37de807ff..9874a1eb21 100644 --- a/crawl-ref/source/godcompanions.cc +++ b/crawl-ref/source/godcompanions.cc @@ -45,14 +45,8 @@ void remove_all_companions(god_type god) monster* mons = monster_by_mid(i->first); if (!mons) mons = &i->second.mons.mons; - if ((god == GOD_YREDELEMNUL - && is_yred_undead_slave(mons)) - || (god == GOD_BEOGH - && mons->wont_attack() - && mons_is_god_gift(mons, GOD_BEOGH))) - { + if (mons_is_god_gift(mons, god)) companion_list.erase(i++); - } else ++i; } |