diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-22 19:17:05 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-22 19:17:05 +0000 |
commit | a34de2b319560dd0a2e75b16729df6cfaf9daa12 (patch) | |
tree | 84452dd0a0a6e5bade474e0b8fdf4155931ad04f /crawl-ref/source/monplace.cc | |
parent | 53b94b89c7037837eb6bf00ea8b71d9f92963f35 (diff) | |
download | crawl-ref-a34de2b319560dd0a2e75b16729df6cfaf9daa12.tar.gz crawl-ref-a34de2b319560dd0a2e75b16729df6cfaf9daa12.zip |
Apply crash fixes to trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10017 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 3168a28796..aa5df5c286 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -2443,12 +2443,15 @@ int create_monster(mgen_data mg, bool fail_msg) || !mons_class_can_pass(montype, grd(mg.pos))) { mg.pos = find_newmons_square(montype, mg.pos); + // Gods other than Xom will try to avoid placing their monsters // directly in harm's way. if (mg.god != GOD_NO_GOD && mg.god != GOD_XOM) { monsters dummy; - dummy.type = mg.cls; + // If the type isn't known yet assume no resists or anything. + dummy.type = (mg.cls == RANDOM_MONSTER) ? MONS_HUMAN + : mg.cls; dummy.base_monster = mg.base_type; dummy.god = mg.god; |