diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index cf0bcd919f778..0bb4f6b0549e2 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -1018,9 +1018,7 @@ void avatar_action::plthrow( avatar &you, item_location loc, } // you must wield the item to throw it if( !you.is_wielding( *orig ) ) { - if( you.wield( *orig ) ) { - orig = &you.weapon; - } else { + if( !you.wield( *orig ) ) { return; } } diff --git a/src/map.h b/src/map.h index 46eb2974dc121..c769bd1042e22 100644 --- a/src/map.h +++ b/src/map.h @@ -268,10 +268,7 @@ class map bool check_seen_cache( const tripoint &p ) const { std::bitset &memory_seen_cache = get_cache( p.z ).map_memory_seen_cache; - if( !memory_seen_cache[ static_cast( p.x + p.y * MAPSIZE_Y ) ] ) { - return true; - } - return false; + return !memory_seen_cache[ static_cast( p.x + p.y * MAPSIZE_Y ) ]; } bool check_and_set_seen_cache( const tripoint &p ) const { std::bitset &memory_seen_cache =