Skip to content

Commit

Permalink
Merge pull request #198 from WhiteCloud0123/develop
Browse files Browse the repository at this point in the history
NPC死亡时,掉落物附着尸体上
  • Loading branch information
WhiteCloud0123 authored Jul 14, 2023
2 parents 41b9651 + a099c9c commit 8b6fd2d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9317,8 +9317,10 @@ 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 ) {
here.add_item_or_charges( pos(), *itm );
item& i = *itm;
body.force_insert_item(i,item_pocket::pocket_type::CONTAINER);
}
for( const bionic &bio : *my_bionics ) {
if( item::type_is_defined( bio.info().itype() ) ) {
Expand Down Expand Up @@ -9360,7 +9362,8 @@ void Character::place_corpse( const tripoint_abs_omt &om_target )
std::vector<item *> tmp = inv_dump();
item body = item::make_corpse( mtype_id::NULL_ID(), calendar::turn, get_name() );
for( item *itm : tmp ) {
bay.add_item_or_charges( fin, *itm );
item& i = *itm;
body.force_insert_item(i, item_pocket::pocket_type::CONTAINER);
}
for( const bionic &bio : *my_bionics ) {
if( item::type_is_defined( bio.info().itype() ) ) {
Expand Down

0 comments on commit 8b6fd2d

Please sign in to comment.