diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-03 21:21:26 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-03 21:21:26 +0000 |
commit | d107e792196a1eba3e5dd2c3c50a0454ac68088d (patch) | |
tree | 54974d350f7e4555fb0b2856be4c2d2a17b67a3e /crawl-ref/source/monplace.cc | |
parent | 90c66b94944ca1f5428c737d68261d86e927c7a2 (diff) | |
download | crawl-ref-d107e792196a1eba3e5dd2c3c50a0454ac68088d.tar.gz crawl-ref-d107e792196a1eba3e5dd2c3c50a0454ac68088d.zip |
Add miscellaneous type cleanups and comment fixes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3177 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 5a5f753a72..182c7d2e71 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -74,7 +74,8 @@ bool grid_compatible(dungeon_feature_type grid_wanted, // // If you have an actual monster, use this instead of the overloaded function // that uses only the monster class to make decisions. -bool monster_habitable_grid(const monsters *m, dungeon_feature_type actual_grid) +bool monster_habitable_grid(const monsters *m, + dungeon_feature_type actual_grid) { return (monster_habitable_grid(m->type, actual_grid, mons_flies(m), m->paralysed())); @@ -84,7 +85,7 @@ inline static bool mons_airborne(int mcls, int flies, bool paralysed) { if (flies == -1) flies = mons_class_flies(mcls); - return (paralysed? flies == 2 : flies != 0); + return (paralysed ? flies == FL_LEVITATE : flies != FL_NONE); } // Can monsters of class monster_class live happily on actual_grid? Use flies @@ -92,7 +93,7 @@ inline static bool mons_airborne(int mcls, int flies, bool paralysed) // // [dshaligram] We're trying to harmonise the checks from various places into // one check, so we no longer care if a water elemental springs into existence -// on dry land, because they're supposed to be able to move onto dry land +// on dry land, because they're supposed to be able to move onto dry land // anyway. bool monster_habitable_grid(int monster_class, dungeon_feature_type actual_grid, @@ -106,7 +107,7 @@ bool monster_habitable_grid(int monster_class, // only have to check for the additional valid grids of deep // water and lava. || (mons_airborne(monster_class, flies, paralysed) - && (actual_grid == DNGN_LAVA + && (actual_grid == DNGN_LAVA || actual_grid == DNGN_DEEP_WATER)) // Amphibious critters are happy in water or on land. |