diff options
-rw-r--r-- | crawl-ref/source/ghost.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/itemprop.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/player.h | 2 |
4 files changed, 9 insertions, 10 deletions
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc index a2986add5c..4e41fe54f2 100644 --- a/crawl-ref/source/ghost.cc +++ b/crawl-ref/source/ghost.cc @@ -179,7 +179,7 @@ void ghost_demon::init_random_demon() { do { - brand = static_cast<brand_type>( random2(MAX_PAN_LORD_BRANDS) ); + brand = static_cast<brand_type>(random2(MAX_PAN_LORD_BRANDS)); // some brands inappropriate (e.g. holy wrath) } while (brand == SPWPN_HOLY_WRATH diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 58c46a4879..4290ed583e 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1543,11 +1543,11 @@ hands_reqd_type hands_reqd( const item_def &item, size_type size ) } // Adjust handedness for size only for non-whip melee weapons. - if (!is_range_weapon( item ) + if (!is_range_weapon(item) && item.sub_type != WPN_WHIP && item.sub_type != WPN_DEMON_WHIP) { - fit = cmp_weapon_size( item, size ); + fit = cmp_weapon_size(item, size); // Adjust handedness for non-medium races: // (XX values don't matter, see fit_weapon_wieldable_size) @@ -2085,13 +2085,13 @@ bool is_throwable( const item_def &wpn, size_type bodysize ) return (Weapon_prop[ Weapon_index[wpn.sub_type] ].throwable); else if (wpn.base_type == OBJ_MISSILES) { - if (bodysize < SIZE_MEDIUM && wpn.sub_type == MI_JAVELIN) - return (false); - if (bodysize < SIZE_MEDIUM && wpn.sub_type == MI_THROWING_NET) + if (bodysize < SIZE_MEDIUM + && (wpn.sub_type == MI_JAVELIN || wpn.sub_type == MI_THROWING_NET)) + { return (false); + } return (Missile_prop[ Missile_index[wpn.sub_type] ].throwable); } - return (false); } diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 47720f878c..779c441f89 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -5852,8 +5852,7 @@ bool player::can_pass_through_feat(dungeon_feature_type grid) const size_type player::body_size(int psize, bool base) const { - size_type ret = (base) ? SIZE_CHARACTER - : transform_size( psize ); + size_type ret = base ? SIZE_CHARACTER : transform_size(psize); if (ret == SIZE_CHARACTER) { diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 199d2e3066..c405b0b8b0 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -437,7 +437,7 @@ void dec_disease_player(); bool rot_player(int amount); bool player_has_spell( spell_type spell ); -size_type player_size( int psize = PSIZE_TORSO, bool base = false ); +size_type player_size(int psize = PSIZE_TORSO, bool base = false); bool player_weapon_wielded(); item_def *player_weapon(); |