From d1b2f3328d24a9991857bab59da0a4eb6ab9a362 Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Sun, 23 Feb 2020 05:07:33 +0000 Subject: [PATCH] Supress searching ground for ammo when mounted. --- src/player.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/player.cpp b/src/player.cpp index 38d6012990b17..93486dadbfd3c 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -3042,8 +3042,9 @@ bool player::list_ammo( const item &base, std::vector &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;