From a483c6b6f3cfcd7a9ed6d94cfd5bd7d7b3f12ee4 Mon Sep 17 00:00:00 2001 From: WhiteCloud0123 <112397151+WhiteCloud0123@users.noreply.github.com> Date: Fri, 14 Jul 2023 17:12:05 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"NPC=E6=AD=BB=E4=BA=A1=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=8E=89=E8=90=BD=E7=89=A9=E9=99=84=E7=9D=80=E5=B0=B8?= =?UTF-8?q?=E4=BD=93=E4=B8=8A"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit a099c9ce1668bae84d492a3c4df1d844bf08ce54. --- src/character.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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() ) ) {