Skip to content

Commit

Permalink
Supress searching ground for ammo when mounted.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingranade committed Feb 23, 2020
1 parent 9015618 commit d1b2f33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3042,8 +3042,9 @@ bool player::list_ammo( const item &base, std::vector<item::reload_option> &ammo
}

bool ammo_match_found = false;
int ammo_search_range = is_mounted() ? -1 : 1;
for( const auto e : opts ) {
for( item_location &ammo : find_ammo( *e, empty ) ) {
for( item_location &ammo : find_ammo( *e, empty, ammo_search_range ) ) {
// don't try to unload frozen liquids
if( ammo->is_watertight_container() && ammo->contents_made_of( SOLID ) ) {
continue;
Expand Down

0 comments on commit d1b2f33

Please sign in to comment.