summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-13 03:21:41 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-13 03:21:41 -0800
commitdf750a0139a6fb3bd89aa87066f29236211cd9f1 (patch)
tree028baf0ea8b5edeaec46adea1f545d53c55f2fa0 /crawl-ref/source/religion.cc
parenta228636066120596757c3d395fdb802ba107063f (diff)
downloadcrawl-ref-df750a0139a6fb3bd89aa87066f29236211cd9f1.tar.gz
crawl-ref-df750a0139a6fb3bd89aa87066f29236211cd9f1.zip
religion.cc: mons_make_god_gift(): switching gods
mons_make_god_gift() would assert if a monster already had mon->god set to something besides GOD_NO_GOD or the god doing the gifting, but this didn't work with Jiyva slimifying orcs that worship Beogh. I think this is left over from before there was MF_GOD_GIFT, when mon->god != GOD_NO_GOD mean that the monster was a god-gift. So now instead it asserts if the monster is already a god gift.
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index f29e38152e..74158c88b8 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -1374,8 +1374,7 @@ void mons_make_god_gift(monsters *mon, god_type god)
if (god == GOD_NO_GOD)
god = acting_god;
- ASSERT(acting_god == GOD_NO_GOD || god == acting_god);
- ASSERT(mon->god == GOD_NO_GOD || mon->god == god);
+ ASSERT(!(mon->flags & MF_GOD_GIFT));
mon->god = god;