summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godcompanions.cc
diff options
context:
space:
mode:
authorDracoOmega <draco_omega@live.com>2013-03-05 23:37:29 -0330
committerDracoOmega <draco_omega@live.com>2013-03-06 01:20:19 -0330
commit6777ac41de40957e04ed8670e4551284dc62344c (patch)
tree77932b4db8df25e37b45a4f305ced3d1e83c822e /crawl-ref/source/godcompanions.cc
parente58ea8d632696e3d9636991f63af282153febfdc (diff)
downloadcrawl-ref-6777ac41de40957e04ed8670e4551284dc62344c.tar.gz
crawl-ref-6777ac41de40957e04ed8670e4551284dc62344c.zip
Fix cloning Yred/Beogh companions via recall and stairs
Diffstat (limited to 'crawl-ref/source/godcompanions.cc')
-rw-r--r--crawl-ref/source/godcompanions.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/godcompanions.cc b/crawl-ref/source/godcompanions.cc
index aff7b13ecc..1a5ae0f101 100644
--- a/crawl-ref/source/godcompanions.cc
+++ b/crawl-ref/source/godcompanions.cc
@@ -57,9 +57,15 @@ void remove_all_companions(god_type god)
void move_companion_to(const monster* mons, const level_id lid)
{
- companion_list[mons->mid].level = lid;
- companion_list[mons->mid].mons = follower(*mons);
- companion_list[mons->mid].timestamp = you.elapsed_time;
+ // If it's taking stairs, that means the player is heading ahead of it,
+ // so we shouldn't relocate the monster until it actually arrives
+ // (or we can clone things on the other end)
+ if (!(mons->flags & MF_TAKING_STAIRS))
+ {
+ companion_list[mons->mid].level = lid;
+ companion_list[mons->mid].mons = follower(*mons);
+ companion_list[mons->mid].timestamp = you.elapsed_time;
+ }
}
void update_companions()