Skip to content

Commit

Permalink
Don't remove non-unwieldable weapons when limb breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Valiant authored and kevingranade committed Dec 25, 2019
1 parent 3bf6b7f commit 5189297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@ void player::apply_damage( Creature *source, body_part hurt, int dam, const bool
g->events().send<event_type::character_takes_damage>( getID(), dam_to_bodypart );

if( hp_cur[hurtpart] <= 0 && ( source == nullptr || !source->is_hallucination() ) ) {
if( !weapon.is_null() && !can_wield( weapon ).success() ) {
if( !weapon.is_null() && can_unwield( weapon ).success() ) {
put_into_vehicle_or_drop( *this, item_drop_reason::tumbling, { weapon } );
i_rem( &weapon );
}
Expand Down

0 comments on commit 5189297

Please sign in to comment.