diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-07 00:21:19 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-07 00:21:19 +0000 |
commit | 108ddcb271866c11e8c980977e50009594d11e4e (patch) | |
tree | 6a3c0fd27aa8e6812b22fbb4743a661a4dd7e895 /crawl-ref/source/monplace.cc | |
parent | 95581358c4008d1f3ca346db4045e2c4ab4dcef9 (diff) | |
download | crawl-ref-108ddcb271866c11e8c980977e50009594d11e4e.tar.gz crawl-ref-108ddcb271866c11e8c980977e50009594d11e4e.zip |
Expand monster speed handling to work on the level of individual
monsters.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7166 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 00bd5c8613..4b272beff3 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -619,9 +619,9 @@ int place_monster(mgen_data mg, bool force_pos) if (mg.proximity == PROX_NEAR_STAIRS) { // For some cases disallow monsters on stairs. - if (mons_class_is_stationary( mg.cls ) + if (mons_class_is_stationary(mg.cls) || (pval == 2 // Stairs occupied by player. - && (mons_speed(mg.cls) == 0 || grd(mg.pos) == DNGN_LAVA + && (mons_class_speed(mg.cls) == 0 || grd(mg.pos) == DNGN_LAVA || grd(mg.pos) == DNGN_DEEP_WATER))) { mg.proximity = PROX_AWAY_FROM_PLAYER; @@ -688,7 +688,7 @@ int place_monster(mgen_data mg, bool force_pos) if (pval == 2) // player on stairs { // 0 speed monsters can't shove player out of their way. - if (mons_speed(mg.cls) == 0) + if (mons_class_speed(mg.cls) == 0) { proxOK = false; break; |