diff --git a/src/character.cpp b/src/character.cpp index 8a18b794..4cad8d03 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -9317,10 +9317,8 @@ void Character::place_corpse() item body = item::make_corpse( mtype_id::NULL_ID(), calendar::turn, get_name() ); body.set_item_temperature( units::from_celsius( 37 ) ); map &here = get_map(); - for( item *itm : tmp ) { - item& i = *itm; - body.force_insert_item(i,item_pocket::pocket_type::CONTAINER); + here.add_item_or_charges( pos(), *itm ); } for( const bionic &bio : *my_bionics ) { if( item::type_is_defined( bio.info().itype() ) ) { @@ -9362,8 +9360,7 @@ void Character::place_corpse( const tripoint_abs_omt &om_target ) std::vector tmp = inv_dump(); item body = item::make_corpse( mtype_id::NULL_ID(), calendar::turn, get_name() ); for( item *itm : tmp ) { - item& i = *itm; - body.force_insert_item(i, item_pocket::pocket_type::CONTAINER); + bay.add_item_or_charges( fin, *itm ); } for( const bionic &bio : *my_bionics ) { if( item::type_is_defined( bio.info().itype() ) ) {